We are developing a plugin which calculates the tax based on the customer address. For this, I have to write the test cases manually. Please suggest me a way to write the web services test cases effectively.
3 Answers
- Take Soap UI
- Generate a project using the URL to WSDL file of your service
Now you get the "local" methods to invoke all the "remote" methods of your web service
- Analyze what data do the methods accept and what data do the methods return
- Apply common black-box test design practices and requirement specification of your service to prepare a particular test set for your service.
As Alexey suggests, Black Box testing is a good way to test something like this.
You can create a single test where you change two things to create a brand new test.
- input
- output
I had a similar task, I had a way to input the address data, along with the product pricing and amount, "the black box" would output a file, which was in a specific format, so that I could check the response and I could expect that the response would have the correct tax amount for the address I gave the box.
You can calculate the tax manually for each input and then put it into the expected file and compare the actual output with what you expected the output to look like, this can be easily done with Notepad++ using the Compare plugin.
I've tested something similar, I wrote some Excel VBA to generate input and expected output values (in your case input would be something like annual salary and address and output would be expected tax)
I then used SoapUI (Pro) I imported the excel data as a data step parameterised the XML with the input data Added a rest call to parse the XML Added assetions using the output data from the data step Added a datasource loop to iterate ove the whole file
Mark Smith