maven - How to integrate rest api test using soapui with selenium using junit framework -
i want integrate selenium-webdriver framework written using junit soapui rest api test suites, there way it?
thanks in advance
based on comments, here how need change tests, that, able run both kinds of tests within soapui i.e.,rest , ui
.
i not sure, if happened create soapui project. if not, create project, import .wadl or swagger definition
of rest api.
then create test suite, , test cases required.
now test case should having steps defined:
- rest request step(one or multiple steps) : contains rest api calls
- groovy script : whatever test code have in junit test, needs come here. groovy should able run of java code. but, if familiar, can add groovy code itself. so, able same run eclipse ide.
bringing test steps soapui test case have added advantage can share data (in form of variables ) across rest , ui well.
you can execute tests using soapui's commandline utility testrunner.bat/.sh of soapui_home/bin directory.
it possible define application url / credentials in form of project / test suite / test case level properties (as applicable tests) , use property expansion. helps run tests against different servers such dev, qa etc.,
i understand wanted junit execute tests, if wanted purely junit, there no need / benefit using soapui. instead of soapui, can use different library, such groovy wslite make rest calls in junit .
hope helps.
Comments
Post a Comment