ContributionsMost RecentMost LikesSolutionsCucumberJS: how to retrieve tags in BeforeAll Dear Community, One question for cucumberjs: I defined a hooks BeforeAll like BeforeAll("@smoke and @ios", async () => {}) How can I get which tags in callback or promise? Thanks, /Aaron Re: How to script creating report and then email link to report location for ReadyAPI functional test em_qdx, you may need to collect test results information and construct HTML report by yourself. It's very easy to create a HTML report. All of test running information would be retrieved from testResults. For instance: // retrieve test running info for (r in runner.results.sort {it.getStartTime()}) {} // construct HTML report def writer = new StringWriter() def builder = new groovy.xml.MarkupBuilder(writer) builder.html { head {} } Thanks, /Aaron Re: Missing methods in ReadyAPI SDK documentation and Groovy editor hints HiKarelHusa, There is a method called "getActiveEnvironment" which return object of Environment, and can get its name. For example: project.activeEnvironment.name As for getActiveEnvironmentName(), I did not also find it and never use it since I've no idea There are several different API docs for ReadyAPI (Open source and Pro). Pro: https://support.smartbear.com/readyapi/apidocs/pro/index.html?overview-summary.html Open: https://support.smartbear.com/readyapi/apidocs/soapui/index.html?overview-summary.html SoapUI: https://www.soapui.org/apidocs/5.5.0/index.html(This one is useful but seems no longer maintain) TanyaYatskovska, Would you please suggest which API docs to reference for ReadyAPI tool? Thanks, /Aaron Re: How to access different environment if same domain with different IP address nmraoeach environment is a cluster. In order to save resource and security, all QAT environments are using same domain name+port. If access via internet, then configure different port, the smart proxy can route to correct server. I am trying to configure a nginx server to do so. curl is ok with its build-in functions and pure code(i.e. implement a dns server) is ok as well. As domain name and port are the same, even if proxy server is ok, it cannot distinguish different environment and route to correct server, that mean I have to add indicator (ie. custom header property) and configure corresponding routing rules in proxy server. Btw, all rest request are https, so it needs more extra processing in configuration. Thanks, /Aaron Re: Automating the process to get access token SoapuiTeay Looks like you need to get token from web page. So you are able to create a common test case with http request to simulate web page action to capture required login information. Then using above-mentioned scripts to create an auth profile and each REST step to reference it. If you have direct method or API (i.e. /token) to retrieve access token with credential, then no need to capture login credential like web page. Not sure which type of authentication you use? Thanks, /Aaron How to access different environment if same domain with different IP address Hi Community, There are different test environments, i.e QAT1, QAT2, QAT3. as access constraint, only allow domain name to access with same port and no DNS in intranet network. Currently configure domain name with IP address in hosts file, but it's hard to switch environment and allow one environment to access only Is there anyone provided a solution? I can use curl to send http request withcurl http://www.example.com --resolve www.example.com:80:127.0.0.1 How can I use ReadyAPI to access? Thanks, /Aaron Re: Automating the process to get access token SoapuiTeay If you have separate /token for oauth2, then you are able to create a scripts to dynamically get access_token. FYI import groovy.json.JsonSlurper def data = new JsonSlurper().parseText(response) // get response of token // set access token def authProfileName = "LoginToken" def project = testRunner.testCase.testSuite.project def profile = project.getOAuth2ProfileContainer() if (! (authProfileName in profile.getOAuth2ProfileList().name)) { profile.addNewOAuth2Profile(authProfileName) // add new oauth2 } def auth = profile.getProfileByName(authProfileName) auth.setAccessToken(data.access_token) // set token project.setAuthProfile(authProfileName) // applied in project level Then you can select "LoginToken" for your request in test step or changed it in Auth manager Thanks, /Aaron Re: Performance Test to sequentially run large quantity of Test Cases MichaelMcGroary it is possible to automatically create / clone test cases in ReadyAPI. Would you please clearly state what you want. Actually I do not understand what you want. Thanks, /Aaron Swagger Compliance Assertion to check response Dears, One question for "Swagger Compliance Assertion" to check schema, I'd like to validate response in yaml file (Swagger) with strick mode, It seems cannot check case-sensitive node name. Here is an example (Actual response is complex with multiple nested structure) in yaml file: Response: type: object properties: Result: type: integer example: 0 response: { "result" : 0 } As some of properties changed, is there any way to monitor what change is? in development team, back-end update their returned response, but did not release new API version (yaml), then front-end cannot parse changed response. in API test, it should be detected all of these changes and update them to development team, then front-end / back-end can align again which change will be impacted. Thanks, /Aaron Operating with REST Interfaces and Requests Question Create a script which posts REST Interfaces structures of a current project to a text file. Under each method, list names of functional REST Request Test Steps for this method. The format of the file is arbitrary (whatever looks more reasonable and readable for you). Example: https://www.screencast.com/t/WVmvALNW2Ds Answer def space = {num -> ' ' * num} def stringBuilder = new StringBuilder() project.getInterfaceList().each{p -> // interface name stringBuilder.append("${p.name}\n") p.getOperationList().each{m -> //operation name stringBuilder.append("${space(5)}${m.name}\n") m.getRequestList().each{r -> //http method name stringBuilder.append("${space(10)}${r.getMethod()}\n") //rest method name stringBuilder.append("${space(15)}${r.getRestMethod().name}\n") } } } def writeToFile(def directory, def filename, def extension, def content){ if(! content.trim().isEmpty()){ def folder = new File(directory) if( ! folder.exists()) folder.mkdirs() new File("$directory/$filename$extension").withWriter{out -> out << content } } } writeToFile("C:/", "project_structure", ".txt", stringBuilder.toString())