Skip to main content

Posts

How to get upstream job status in Hudson from downstream jobs statuses

This is step-by-step instruction based on this blog: http://fatalfailure.wordpress.com/2011/06/14/jenkins-hudson-getting-the-overall-status-in-the-upstream-job-from-the-downstream-jobs/ Upstream job configuration 1. Adding downstream jobs a) In 'Post-build Actions' section set 'Build other projects' checkbox b) Add downstream jobs in 'Build other projects', separated by comma c) Set 'Trigger even if the build is unstable' 2. Setting up fingerprinting to connect upstream job with downstream jobs a) In 'Post-build Actions' section set 'Record fingerprints of files to track usage' checkbox b) Set '**' in 'Files to fingerprint' field c) Set 'Keep the build logs of dependencies' checkbox Downstream jobs configuration 1. Setting up fingerprinting to connect upstream job with downstream jobs a) In 'Post-build Actions' section set 'Record fingerprints of files to track usage' checkbox b) Set ...

Integration of your test suite with Hudson using Apache Ant

The quick, dirty and painless guide to integrate your test automation suite with Hudson. Prerequisites 1. It is assumed that you already have test automation suite that produces test results in JUnit XML format. For example this can be a bundle of Selenium RC and JUnit. Or Watir and Cucumber with JUnit-style reporter. 2. You need to create Ant project build.xml script that executes your test suite. Materials: http://varun-qa.blogspot.com/2010/03/ant-script-for-generating-junit-report.html Example (execution of Watir/Cucumber test suite on Windows): 3. It is assumed that your test automation suite is stored to Subversion or CVS server. 4. Download hudson.war from here: http://hudson-ci.org/latest/hudson.war Steps 1. Go to the directory with downloaded hudson.war and run the following command: java -jar hudson.war 2. Open your browser and go to: http://localhost:8080/ 3. Click "New Job" link on the left panel of Hudson dashboard 4. Enter job name (this can be any...

Multiplatform Java solution to take a screenshot in your tests

This small chunk of code will help you to take a screenshot of entire screen on any platform. It is especially helpful in test automation frameworks to add "take a screenshot on failure" functionality. captureScreen method accepts the filename of the image to be produced in PNG format including the full path (absolute or relative to the working directory), e.g. "out/screenshots/myscreen.png"

JMeter handling dynamic ViewState parameter in Seam framework

Testing applications built with Seam Java framework is possible with JMeter like any other web applications, though there are some nuances to take into account. One of them is ViewState parameter. This parameter is dynamic and it means that we cannot just leave it hardcoded in our JMeter script because it will be broken the next time you try to execute it. Why this happens? Let's dig a little deeper. Black-box testing doesn't require us to know how Seam framework works, right? Okay, in this case we only need to know how it affects our tests. As testers we need to make sure that ViewState parameter in the POST request has the same value as returned by a previous GET request. For example you have two subsequent requests: GET http://x.x.x.x:8080/some_page.seam POST http://x.x.x.x:8080/some_page.seam The first request opens a page and the second one performs an action on the page (for instance - expands some tab, tree, etc). If you analyze the response data with a list...

Server-side authorization in JMeter

How to handle server-side authorization with JMeter? Well, this is probably one of the most popular questions amid the novices implementing JMeter tests. It is very straightforward to pass credentials in the POST request if this type of authorization is implemented on application side. But what if we have authorization configured on Apache web server? It is showing us a pop-up demanding user and password every time we try to access the application. However it is very easy to handle, you just need to use JMeter HTTP Authorization Manager . You can do this in two steps: Add authorization manager to your thread group: Add -> Config Element -> HTTP Authorization Manager. Set application URL, username and password fields.