Unable to use the test runner in ReadyAPI 3.10.2
When I tried using the Launch Test runner option from ReadyAPI 3.10.2 with below error. Tue May 17 07:44:33 BST 2022: ERROR: java.lang.NullPointerException: Cannot invoke "com.eviware.soapui.impl.wsdl.tags.Tag.toString()" because the return value of "java.util.Map.get(Object)" is null Tue May 17 07:44:33 BST 2022: ERROR: java.lang.NullPointerException: Cannot invoke "com.eviware.soapui.impl.wsdl.tags.Tag.toString()" because the return value of "java.util.Map.get(Object)" is null java.lang.NullPointerException: Cannot invoke "com.eviware.soapui.impl.wsdl.tags.Tag.toString()" because the return value of "java.util.Map.get(Object)" is null at com.eviware.soapui.impl.wsdl.WsdlProject.getTagById(WsdlProject.java:3186) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction.a(TestRunnerAction.java:359) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction.refreshTagList(TestRunnerAction.java:309) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction.initValues(TestRunnerAction.java:497) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.TestRunnerAction.initValues(TestRunnerAction.java:1) at com.eviware.soapui.impl.wsdl.actions.iface.tools.support.AbstractToolsAction.perform(AbstractToolsAction.java:123) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.ProTestRunnerUIAction.perform(ProTestRunnerUIAction.java:16) at com.eviware.soapui.impl.wsdl.actions.iface.tools.soapui.ProTestRunnerUIAction.perform(ProTestRunnerUIAction.java:1) at com.eviware.soapui.support.action.swing.SwingActionDelegate.actionPerformed(SwingActionDelegate.java:195) at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1972) at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2313)1.4KViews0likes2CommentsReadyAPI and TestEngine with Zephyr Scale
In this post, we are going to talk about using some of the SmartBear API testing tools and writing the results in an automated fashion to Zephyr Scale. But first let's take a step back and discuss a general approach of using testing tools with test management tools. At a manual level, when creating simple Multi-Protocol API tests, we might use a lighter weight tool like SoapUI Open Source, a great tool for quick and basic functional and performance API tests. After we trigger the test manually, we as humans would parse the report for any details on the test run, and to track it would update a spreadsheet, testcase in Jira, but somewhere. This sequence is important to note for when we start to advance to an automated workflow. Now let's talk about automating this process. We execute our API tests in an ephemeral environment, publish the results to a relative location, and then pass those results from that relative location to a test management platform. It is quite simple. In this workflow it tends to be easier to use a tool that has native integrations into CI platforms like Jenkins and Azure Dev Ops, that make managing our executions in these ephemeral environments much easier. Here, ReadyAPI, or TestEngine is the clear choice as they both seamlessly integrate into any CI-CD system and have native integrations into Jenkins, Azure, and many more. Now that sequence I mentioned earlier is very important. We will execute our API tests, and then pass the results into Zephyr Scale as step 2 in the pipeline. Here is a look at a scripted pipeline approach, note that there is freestyle job options available in Jenkins too. ReadyAPI Jenkins Plugin: https://support.smartbear.com/readyapi/docs/integrations/jenkins.html TestEngine Jenkins Plugin: https://support.smartbear.com/testengine/docs/admin/jenkins.html node { stage('Run API Tests') { // Run the API Tests using ReadyAPI or TestEngine stage('Pass Results') { //Pass Results to Zephyr Scale } } Now we need to be a little more specific with the 'Run API Tests' Stage. Above I mention when we run our API Tests in an automated fashion, we need to write the results to a relative location so that we can then send those results to Zephyr Scale from that location. Both ReadyAPI and TestEngine allow us to write results to locations as part of the command-line or native integrations. I will show command- line options for ReadyAPI and UI native integration for TestEngine but both options are available for both tools. Starting with ReadyAPI, testrunner CLI, the -f and -F flags represent the directory we are writing to, and the report format, respectively. ReadyAPI offers reports in PDF, XLS, HTML, RTF, CSV, TXT and XML, but the automation recommendation would be to pass results in the Junit-XML option. At a basic level we need this: testrunner.bat [optional-arguments] <test-project> And we need to specify -f and -F testrunner.bat -f<directory> -F<args> <test-project> and with -f requiring a relative directory, that can change based on the CI system. I will use Azure Dev Ops for both my examples here. In Azure I pull my test cases from the $(System.DefaultWorkingDirectory), which contains my git repo. In Azure I publish results to the $(Common.TestResultsDirectory) An example full command would look like this: "C:\Program Files\SmartBear\ReadyAPI-3.40.1\bin\testrunner.bat" -r -a -j -f$(Common.TestResultsDirectory) "-RJUnit-Style HTML Report" -FXML "-EDefault environment" "$(System.DefaultWorkingDirectory)/" With TestEngine it's very similar, but I am highlighting it through the native integration, note the publish test results and save Junit report option enabled below: Now lastly, we need to send the results to Zephyr Scale from the pipeline, before our release is over. I think it's easiest with the Zephyr Scale API: https://support.smartbear.com/zephyr-squad-cloud/docs/api/index.html along with the Auto-Create Test Case option to true. The command below is a basic example, and replica of the one seen in the Azure Pipeline screenshot. curl -H "Authorization: Bearer Zephyr-Scale-Token-Here" -F file= Relative-Location-of-Report-Here\report.xml;type=application/xml "https://api.zephyrscale.smartbear.com/v2/automations/executions/junit?projectKey=Project-Key-Here&autoCreateTestCases=true" After you modify the API token, Relative location, and project key you are good to run the pipeline. When we jump to Jira, we can see inside Zephyr Scale that the results are populating. Even with transactional Data on the failed test steps.1.6KViews0likes0CommentsNullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep
I am stuck with below error . I am calling a groovy test step from assertion of a Test Step and this groovy test step is calling another test case . it is running but below exception is coming . Just sample code . Test Step 1 - > In assertion calling another test step based on some conditions context.testCase.getTestStepByName("VerifyAddress").run(context.testRunner,context) Test step 2 (VerifyAddress) //calling another step based on few conditions def key = context.testCase.testSuite.project.testSuites['Keywords_Addresses'].testCases['ApproveAdress'] key.setPropertyValue("city",city) def runner = key.run( null, true ) runner.waitUntilFinished() Thu Apr 29 22:53:32 IST 2021: ERROR: java.lang.NullPointerException java.lang.NullPointerException at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequestStep.run(RestTestRequestStep.java:921) at com.eviware.soapui.model.testsuite.TestStep$run$0.call(Unknown Source) at Script7.run(Script7.groovy:14) at com.eviware.soapui.support.scripting.groovy.SoapUIGroovyScriptEngine.run(SoapUIGroovyScriptEngine.java:94) at com.eviware.soapui.support.scripting.groovy.SoapUIProGroovyScriptEngineFactory$SoapUIProGroovyScriptEngine.run(SoapUIProGroovyScriptEngineFactory.java:83) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.assertScript(GroovyScriptAssertion.java:150) at com.eviware.soapui.impl.wsdl.teststeps.assertions.basic.GroovyScriptAssertion.internalAssertResponse(GroovyScriptAssertion.java:186) at com.eviware.soapui.impl.wsdl.teststeps.WsdlMessageAssertion.assertResponse(WsdlMessageAssertion.java:164) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.assertResponse(RestTestRequest.java:150) at com.eviware.soapui.impl.wsdl.teststeps.RestTestRequest.setResponse(RestTestRequest.java:141) at com.eviware.soapui.impl.support.panels.AbstractHttpRequestDesktopPanel.afterSubmit(AbstractHttpRequestDesktopPanel.java:606) at com.eviware.soapui.impl.wsdl.panels.teststeps.RestTestRequestDesktopPanel.afterSubmit(RestTestRequestDesktopPanel.java:365) at com.eviware.soapui.impl.wsdl.WsdlSubmit.notifyListenersAfterSubmit(WsdlSubmit.java:111) at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:157) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:835)Solved2.1KViews0likes4CommentsGetting java.lang.NoClassDefFoundError in Ready API
HI all, I have a need where I need to come up with a function which with return a Jason to map Json { "a": { "b": 1, "c": null, "d": [false, true] }, "e": "f", "g": 2.3 } Map Key Value a.b 1 a.c null a.d[0] false a.d[1] true e f g 2.3 This can be done using JsonFlattener jar and was implemented in Eclipse, so added that external Jar in Ready API under “Custom Java libraries” but on executing this function it error out with message “java.lang.NoClassDefFoundError”, can some one please help me how this can be resolved. Below is the code import com.github.wnameless.json.flattener.JsonFlattener; public def func1(def expected){ def resultMap = [ : ]; resultMap = JsonFlattener.flattenAsMap(expected) return resultMap; }Solved2KViews0likes5CommentsCan we trigger a jenkins job thru ready api
Hi All, I am trying to automate a process in my present project, i have two questions related to it. 1) can I trigger a Jenkins job using ready api? 2) If the answer to my 1st question is Yes, then this jenkins job does a spark submit and run an etl job on hadoop cluster and presently I do a manual check on job status (accept, running, finished) on hadoop by passing a parameter which I used while triggering the jenkins job, So, my second question is can I make calls to the hadoop cluster to check the job status (as this job takes times around 5 to 10 mins to complete can I make recurring calls until the status changes to finished).1.7KViews0likes5CommentsSOAP UI data driven testsuit's custom Junit report using plugin
:I have a problem generating custom JUnit report for SOAPUI Pro using com.github.redfish4ktc.soapui:maven-soapui-extension-plugin:4.5.1.0 plugin asmy testsuits are data driven and have DataSource step (SOAP UI Pro feature) which is not recozinised in this plugin:womansad: I can however generate default JUnit report using com.smartbear:ready-api-maven-plugin:1.5.0 which recoznises DataSource step. How can i get a custom report with datasource as a step? Attaching both my pom.xml. Using ready-api-maven-plugin: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>ready-api-maven-plugin</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>Create SoupUI Application</name> <url>http://repo.maven.apache.org/maven2/</url> <pluginRepositories> <pluginRepository> <id>MavanSmartBearPluginRepository</id> <url>http://repo.maven.apache.org/maven2/</url> </pluginRepository> <pluginRepository> <id>SmartBearPluginRepository</id> <url>http://smartbearsoftware.com/repository/maven2/</url> </pluginRepository> </pluginRepositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> </properties> <build> <plugins> <plugin> <groupId>com.smartbear</groupId> <artifactId>ready-api-maven-plugin</artifactId> <version>1.5.0</version> <dependencies> <dependency> <groupId>net.sourceforge.jtds</groupId> <artifactId>jtds</artifactId> <version>1.3.1</version> </dependency> <dependency> <groupId>net.sourceforge.jexcelapi</groupId> <artifactId>jxl</artifactId> <version>2.6</version> </dependency> <dependency> <groupId>com.jgoodies</groupId> <artifactId>forms</artifactId> <version>1.0.7</version> </dependency> <dependency> <groupId>com.jgoodies</groupId> <artifactId>looks</artifactId> <version>2.2.0</version> </dependency> </dependencies> <executions> <execution> <phase>test</phase> <goals> <goal>test</goal> </goals> <configuration> <projectFile>sampleProject.xml</projectFile> <outputFolder>${basedir}${file.separator}reports</outputFolder> <junitReport>true</junitReport> <exportAll>true</exportAll> <printReport>true</printReport> <testSuite>${testsuite}</testSuite> <soapuiProperties> <property> <name>script.logroot</name> <value>Log/</value> </property> <property> <name>soapui.home</name> <value>C:/Program Files/SmartBear/ReadyAPI-1.5.0/bin</value> </property> </soapuiProperties> </configuration> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.7.2</version> </plugin> </plugins> </reporting> </project> Usingmaven-soapui-extension-plugin: <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>test</groupId> <artifactId>ready-api-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> <name>Create SoupUI Application</name> <repositories> <repository> <id>maven2</id> <url>http://repo.maven.apache.org/maven2</url> </repository> <repository> <id>smartbearpluginRepository</id> <url>http://www.soapui.com/repository/maven2</url> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>maven2</id> <url>http://repo.maven.apache.org/maven2</url> </pluginRepository> <pluginRepository> <id>smartbearpluginRepository</id> <url>http://smartbearsoftware.com/repository/maven2</url> </pluginRepository> </pluginRepositories> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <dep.version.soapui>4.5.1</dep.version.soapui> </properties> <dependencies> <dependency> <groupId>eviware</groupId> <artifactId>soapui</artifactId> <version>${dep.version.soapui}</version> </dependency> <dependency> <groupId>eviware</groupId> <artifactId>soapui-pro</artifactId> <version>${dep.version.soapui}</version> </dependency> <dependency> <groupId>eviware</groupId> <artifactId>ext-xmlbeans</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> </dependency> <dependency> <groupId>com.github.redfish4ktc.soapui</groupId> <artifactId>maven-soapui-extension-plugin</artifactId> <version>4.5.1.0</version> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.1</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> <plugin> <groupId>com.github.redfish4ktc.soapui</groupId> <artifactId>maven-soapui-extension-plugin</artifactId> <version>4.5.1.0</version> <dependencies> <dependency> <groupId>test</groupId> <artifactId>ready-api-maven-plugin</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> <configuration> <runnerType>PRO</runnerType> <projectFile>sampleProject.xml</projectFile> <outputFolder>${basedir}${file.separator}reports</outputFolder> <junitReport>true</junitReport> <printReport>true</printReport> <exportAll>true</exportAll> <junitHtmlReport>true</junitHtmlReport> <soapuiProperties> <property> <name>soapui.logroot</name> <value>Logs/</value> </property> <property> <name>soapui.junit.reportCollector</name> <value>soapui.CustomJunitReportGenerator</value> </property> </soapuiProperties> </configuration> </plugin> </plugins> </build> </project>Solved2.1KViews0likes3CommentsRerun failed test cases for a run that has tests with tags and using test runner
I have a composite project with a list of test suites and the test cases have tags. When running the tests using test runner with Test case tags, i would like to re run the test cases that were failed in the run ? Are there any possiblity to rerun a test case with tag that was failed in the run ? Thanks Jeeva938Views0likes2CommentsSoapUI on Jenkins with global variables (auth)
Hello, I have project for soapUI that contains global variables for username and password. ${#Global#username} Now I have setup to run tests on Jenkins, but it fails to authentication error. I need somehow to pass those global parameters. I have setJenkins job configuration, enable "This build is parameterized" and typedName same asmyvariable username and value for it. But it did not work, test failed, because I see username is empty while trying to call web service.1.6KViews0likes2Comments