Project Detail

A framework for testing XML  

A framework for testing XML is project number 265395
posted at GetAFreelancer.com. Click here to post your own project.

 

Bookmark and Share
Free Trial For New Buyers
 

Status: Closed
(Cancelled by Service Buyer)

Selected Providers: -

Budget: $250-750

Created: 05/22/2008 at 14:47 EDT

Bid Count: 5

Average Bid: N/A

05/25/2008 at 14:47 EDT

Project Creator: programmingbids View PM Post PM
Employer Rating: 10.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/1010.00/10 (42 reviews)

Bid On This Project
 

Description

We need a framework that tests applications that produce XML as output.

This project requires expertise in XML, xpath and xml schemas.

A detailed spec is available.

A simple test suite for a simple "hello world" application that uses this framework is shown below. The hello world application is an application that responds to hello command.
This application can be run as
hello sayhello
This command generates the following output
<XMLResponse status="200" statusText="OK" xmlns="http://xmlconsole.org/2008-04/pc">
<body>
<Hello>XMLUnitTest</Hello>
</body>
</XMLResponse>
This application has been compiled and the executable is placed in folder "Release"
To be able to test this application using XMLUnitTest, the test cases must be defined and saved in a file. For this example, let's assume that the test case is helloworldtest.xml. For this example, let's assume that the desired test is checking whether the content of the "Hello" element is "XMLUnitTest".
<TestCase name="helloworldtest" xmlns="http://xmlunittest.org/2008-06/testcase#">
<ActionSequence>
<Action name="sayhello" >
<Command path="Release/hello" args="sayhello">
<Asserts>
<Assert method="Equal" check="/XMLResponse/body/Hello" value="XMLUnitTest" />
</Asserts>
</Action>
</ActionSequence>
</TestCase>
To run the testcase, the executable "xmlunittest" is used.
xmlunittest -case helloworldtest.xml
<XMLResponse status="200" statusText="OK" xmlns="http://xmlconsole.org/2008-04/pc">
<body>
<TestCaseResult name="helloworldtest" passed="1" failed="0" skipped="0" xmlns="http://xmlunittest.org/2008-06/testcase#">
<ConfigurationResult name="default" passed="1" failed="0" skipped="0">
<ActionTestResults>
<ActionTestResult name="sayhello" passed="1" failed="0" skipped="0">
<Command path="Release/hello" args="sayhello">
<AssertResults>
<AssertResult status="passed" method="Equal" check="/XMLResponse/body/Hello">
<Expected>XMLUnitTest</Expected>
<Actual>XMLUnitTest</Actual>
</AssertResult>
</AssertResults>
</ActionTestResult>
</ActionTestResults>
</ConfigurationResult>
<TestCaseResult>
<body>
</XMLResponse>
This output indicates that the Assert statement has been evaluated and the executable "Release/hello" has behaved as expected and generated a Hello element that contains the the text node "XMLUnitTest".

Messages Posted: 3 View project clarification board Post message on project clarification board

Bid On This Project
 
If you are the project creator or one of the bidders Log In for more options
Bids are hidden by the project creator. Log in as the project creator or as one of the bidders to view bids. You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.

    Bid on this Project