Jan 06 2012

Evaluating your tests using xUnit Test Patterns Refactoring Test Code by Gerard Meszaros

Category: UncategorizedUlrich Palha @ 9:56 am


I did not get any feedback on the approach I had used to write a Data-Driven test that depends on the output of another Data-Driven test, so I decided to do a self-evaluation using the excellent xUnit Test Patterns Refactoring Test Code by Gerard Meszaros.

Goals of Test Automation

First I looked at the overlap between my test requirements (below) and Meszaros’s Chapter 3: Goals of Test Automation.
Continue reading “Evaluating your tests using xUnit Test Patterns Refactoring Test Code by Gerard Meszaros”

Tags: , , , , ,


Dec 23 2011

Using TestNG to write a Data-Driven test that depends on the output of another Data-Driven test

Category: java,open source,testUlrich Palha @ 3:50 pm

Testing Requirements

I have a number of web services that return a status code and an XML payload. For each of these web services, I would like to write tests that meet the following criteria:

  1. Test requirements
    1. Verify that the web service returns the correct status code based on the inputs (testWebserviceStatus)
    2. If the status code is correct, then I would like to verify 1 or more properties of the payload. Every property is independent, so I would like to have each property verification run as a separate test (testWebserviceProperties)
  2. Other requrements
    1. The ability to add/remove the list of web services to test and add/remove the list of properties to verify for each service without updating the test code.
    2. If testWebServiceStatus fails, then its associated testWebserviceProperties should be skipped
    3. The test report should clearly show the success failure of each testWebservice/testWebserviceProperty test along with the web service/property that was being tested

Continue reading “Using TestNG to write a Data-Driven test that depends on the output of another Data-Driven test”

Tags: , , , , ,