Support project that provides ready to use steps for webservices Features:
Feature | Attribute | Details |
---|---|---|
Test-Authoring | Industry Standard | |
Coded | Java (TestNG, Junit) | |
BDD | QAF-BDD, Gherkin | |
Keyword driven | XML,CSV,EXCEL | |
Step-Creation | ||
Java | Y (any Java IDE can be used) | |
BDD | Ecipse QAF BDD editor, QAS | |
Keyword driven | QAS | |
IDE support | Y | Eclipse, IntelliJ, Net-beans, QAS |
Data-driven | Y | XML, CSV, JSON, DB, Excel |
Reporting | XML | Industry Standard – TestNG and Junit |
HTML | TestNG, Junit, QAF(json) detailed reporting | |
Language-Support | Y | Java, Goovy |
Programming | Y Full programming control | |
Test-Data | ||
parameter | Y | |
Random | Y | |
Locale | Y | |
Multiple Env support | Y | |
Orchestration | Y | UI and API test Orchestration |
Test-Management | Y | Supports easy integration with all test management tools |
Build tools | Industry Standard | ANT+IVY, Maven,Gradle |
Request validation | ||
XML | xml path validation | |
JSON | json path validation | |
Schema | Y | |
Run-configuration | Y | TestNG XML (all features) |
Parallel execution | ||
SOAP support | Y | |
REST support | Y |
To start with
- Create QAF Project
- add dependency
<dependency org="com.qmetry" name="qaf-support-ws" rev="latest.integration" />
- Create web-service call repository having all your calls in following format in
.wsc
or.properties
file#format #my.ws.call = {'headers':<json map of key-val pair>,'endpoint':'/myservice-endPoint','baseUrl':'${env.baseurl}','method':'<method GET|POST|PUT|DELETE>','query-parameters':<json map of key-val pair>,'form-parameters':<json map of key-val pair>,'body':'<request-body>'} get.sample.call={'headers':{},'endPoint':'/myservice-endpoint','baseUrl':'${env.baseurl}','method':'GET','query-parameters':{'param1':'val1','param2':'val2'},'form-parameters':{},'body':''}
- Create bdd
Scenario: <scenario name>
When user requests '${get.sample.call}'
Then response should have status code '<status code>'
[And response should have '<expectedvalue1>' at '<jsonpath1>'
And response should have '<expectedvalue2>' at '<jsonpath2>'
:
:
]
Refer ready to use steps for validation. Here you can find Example Projet.
This dependency provides few well known Authentication support as well.
- Basic authentication, requires below properties.
rest.client.impl=com.qmetry.qaf.automation.ws.client.BasicAuthWsClient
rest.client.basic.auth.username=<USERNAME>
rest.client.basic.auth.password=<PASSWORD>
- Digest type authentication, requires below properties.
rest.client.impl=com.qmetry.qaf.automation.ws.client.DigestAuthWsClient
rest.client.digest.auth.username=<USERNAME>
rest.client.digest.auth.password=<PASSWORD>
- OAuth type authentication,requires below properties.
rest.client.impl=com.qmetry.qaf.automation.ws.client.OAuthWsClient
rest.client.oauth.auth.access_token=<ACCESS_TOKEN>
rest.client.oauth.auth.client_id=<CLIENT_ID>
rest.client.oauth.auth.client_secret=<CLIENT_SECRET>
rest.client.oauth.auth.refresh_token=<REFRESH_TOKEN>
rest.client.oauth.auth.username=<USERNAME>
rest.client.oauth.auth.password=<PASSWORD>
rest.client.oauth.auth.authentication_server_url=<AUTHENTICATION_SERVER_URL>
rest.client.oauth.auth.resource_server_url=<RESOURCE_SERVER_URL>
rest.client.oauth.auth.grant_type=<GRANT_TYPE>
- NTLM authentication,requires below properties.
rest.client.impl=com.qmetry.qaf.automation.ws.client.NTLMAuthClient
ntlm.user=<USERNAME>
ntlm.password=PASSWORD
ntlm.workstation=<WORKSTATION>
ntlm.domain=<DOMAIN>
- Hawk authentication,requires below properties
rest.client.impl=com.qmetry.qaf.automation.ws.client.HawkAuthWsClient
rest.client.hawk.auth.keyId=<HAWK_KEY_ID>
rest.client.hawk.auth.key=<HAWK_KEY>