In the Jenkins, sometimes we want to trigger the same job for different environment or different browsers at the same time, rather than in sequence. How to do it ?
It is pretty easy! In the Jenkins job configuration page, there is a checkbox named "Execute concurrent builds if necessary". Once you enable this checkbox, you can trigger your job with different parameters parallel. So simple! enjoy!
Monday, November 13, 2017
Tuesday, September 5, 2017
Web Service Test with Visual Studio -- using data driven csv file
Microsoft Visual Studio : Web Service Test with data driven .csv file
This post is assuming the webservice test has been created already. If not, you can see another post for how to create a web service test.
When we do the Web service call test, we want to test different kind of cases, and we don't want to change the values one by one, test call by test call. so the data driven can help us the do this.
Click ‘Next’ to pick the .csv file
Click ‘Finish’
Modify the content of String Body part,
When running the test, each test run will pick the parameter values from the data drive .csv
file.
Web Service Test with Visual Studio -- using parameters
Microsoft Visual Studio : Web Service Test with parameters
This post is assuming the webservice test has been created already. If not, you can see another post for how to create a web service test.
You can use parameters to replace the
hard-coded values in the String Body values.
Then go to String Body to modify the string body content:
Web Service Test with Visual Studio
Microsoft Visual Studio : Web Service Test
1)
in visual Studio, create a new project:
2)
In the Solution Explorer window, add a new web
performance test
Once you click the Web Performance test, the browser automatically
pops up, it begins to record. You just , Click the stop
button to stop recording. It Doesn’t record anything.
3)
In the Web Performance Test Editor,
right-click the Web performance test and select Add Web Service Request.
After Add Web
Service Request. You
should see the following in the visual studio.
If you cannot see the right Properties window in the right
part in the Web Performance Test Editor,
right click to open the Properties window:
4) In
the Properties window, make sure the Url is the name of webservice link: http://webserviceExample.com:9010/mywebservice.asmx
5)
Open a browser and type the URL of the webservice .asmx page in the Address toolbar.
Select the method that you want to test and examine the SOAP message. It
contains a SOAPAction.
6)
in the visual studio Web Performance Test
Editor, right click to add Header to add a new header. In the Name
property, type
SOAPAction
. In the Value property, type the value
that you see in SOAPAction
, such as "
http://mywebservice/CheckStatus"
.
After add the header and assigned the values , it should
looks like this:
7)
in the Web Performance Test Editor, right click
to add URL QueryString Parameters
8)
Now back to the browser with the URL of the webservice .asmx page in the Address toolbar, you can see
after “?” mark, there are ‘op=CheckStatus’.
9)
Now in the Web Performance Test Editor put the ‘op=CheckStatus’ in to the QueryString
Parameters.
10) In the String Body part, now it is blank.
11)
Click the ellipsis (…) in the String Body
property to open the body string editor popup window.
We copy the web service XML content resembles the following example into the String Boday part:
<?xml version="1.0"
encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CheckStatus xmlns="http://tempuri.org/">
<userName>string</userName>
<password>string</password>
<orderID>int</orderID>
</CheckStatus>
</soap:Body>
</soap:Envelope>
You must
replace any placeholder values in the XML with valid values for the test to
pass. In the previous sample you would replace the two instances of
string
and one int
. This Web service operation will only complete if
there is a registered user who has placed an order.
<?xml
version="1.0" encoding="utf-8"?>
<soap:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<CheckStatus
xmlns="http://tempuri.org/">
<userName>tester</userName>
<password>test1234</password>
<orderID>100</orderID>
</CheckStatus>
</soap:Body>
</soap:Envelope>
Now you are ready to run the web service call test.
Reference link:
Create a web service call test:
Subscribe to:
Posts (Atom)