ContributionsMost RecentMost LikesSolutionsRe: Excel and HTML Report with test summary I was able to create this with below code. Use excel or HTML whatever format you like. Test Step Results along with Failed Assertion list: import com.eviware.soapui.model.testsuite.Assertable.AssertionStatus def file1 def tcFailedStep def failedrequest def request def tcCreateApplication def rawResponse def assList if(new File('C:\\APIFramework\\groovy1.txt').exists()) { log.info("----------------------File Exist----------------------") file1 = new File('C:\\APIFramework\\groovy1.txt') }else { log.info("File Does Not Exist") file1 = new File('C:\\APIFramework\\groovy1.txt') } def TestCase = testRunner.getTestCase() def StepList = TestCase.getTestStepList() StepList.each{ if(it.metaClass.hasProperty(it,'assertionStatus')){ if(it.assertionStatus == AssertionStatus.FAILED) { tcFailedStep="${it.name}" //file1.append "\n Failed Test Case Name = " + tcFailedStep file1.append "\n ${it.name} FAIL" tcCreateApplication = TestCase.testSteps["${it.name}"] //log.info context.testCase.getTestStepByName(“CreateApplication”).getProperty(“Request”).getValue() request = tcCreateApplication.testRequest.response.getRequestContent().toString() rawResponse = new String(testRunner.testCase.testSteps["${it.name}"].testRequest.response.rawResponseData) file1.append "Request for Failed Test Step" + request tcCreateApplication.getAssertionList().each{ if("$it.status" == "FAILED") { assList = assList + "$it.label - $it.status" + "," } } file1.append "\n" + assList file1.append "\n" +rawResponse //log.info (rawResponse) }else if(it.assertionStatus == AssertionStatus.VALID){ file1.append "\n ${it.name} PASSED" }else if(it.assertionStatus == AssertionStatus.UNKNOWN){ file1.append "\n ${it.name} Not Executed (Disabled)" } } } Executing Test Case Based on Flag def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) //"TestData" is my datasource name def ds = testRunner.testCase.testSteps["TestData_CreateApplication"] def rr = ds.getPropertyValue('RunRow') log.info(rr) if ( rr == 'Y' ) { testRunner.gotoStepByName("GetCountyDetails_SubjectProperty") } else { testRunner.gotoStepByName("DataSource Loop") } How to set data source current row using groovy Hi, as attached I am having couple of data source in my current test case. I am using excel sheet to read data. Based on Flag set in first excel sheet, i am deciding wether that row needs be executed or not using groovy script. For First iteration it takes data from each sheet currently for second row it picks data from correct sheet but for all other data source it picks data from again first row. Can someone tell me how to set data source current row programmatically? Groovy Script I am using: def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context) def row = testRunner.testCase.testSteps["TestData_CreateApplication"].currentRow testRunner.testCase.setPropertyValue("RunningRow",row.toString() ) def ds = testRunner.testCase.testSteps["TestData_Abc"] def rr = ds.getPropertyValue('RunRow') log.info(rr) if ( rr == 'Y' ) { testRunner.gotoStepByName("GetCountyDetails_SubjectProperty") } else { testRunner.gotoStepByName("DataSource Loop") } Delete DataSink Property and its values hi, I want to delete Datasink properties using groovy script. Can someone please help me with it? I want to delete Both Property and its values(All). No valid SoapUI NG license exists. Hi, We have bought Ready API license and its installed on my machine. It is working as expected. But when I try to run my scripts from Jenkin i am getting below log. Can you please suggest me whats happening and how to fix this issue. Note: Jenkin is installed on another machine and it is executed from that machine. 19:57:12 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:12 [WARNING] No base packages specified - no classpath scanning will be done 19:57:13 Mar 11, 2017 7:57:35 PM java.util.prefs.FileSystemPreferences$1 run 19:57:13 INFO: Created user preferences directory. 19:57:13 [INFO] Hibernate Validator 4.1.0.Final 19:57:13 [INFO] Adding module 'com.smartbear.ready.cmd.CommandLineModule 19:57:14 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:14 19:57:37,181 WARN [SoapUI] Missing folder [/opt/jenkins/workspace/MtgOneAPIHealthCheck/ext] for external libraries 19:57:14 19:57:37,182 INFO [DefaultSoapUICore] Creating new settings at [/home/nodejs/soapui-settings.xml] 19:57:15 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:15 19:57:37,676 WARN [SoapUIProGroovyScriptEngineFactory] Missing scripts folder [/opt/jenkins/workspace/MtgOneAPIHealthCheck/scripts] 19:57:15 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:15 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:16 19:57:38,607 INFO [PluginManager] 0 plugins loaded in 2 ms 19:57:16 19:57:38,607 INFO [DefaultSoapUICore] All plugins loaded 19:57:16 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:16 19:57:39,359 WARN [SoapUI] Missing folder [/opt/jenkins/workspace/MtgOneAPIHealthCheck/ext] for external libraries 19:57:16 19:57:39,359 INFO [DefaultSoapUICore] Creating new settings at [/home/nodejs/soapui-settings.xml] 19:57:16 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:16 [WARNING] System property 'soapui.home' is not set! Using this directory instead: . 19:57:16 19:57:39,418 INFO [PluginManager] 0 plugins loaded in 0 ms 19:57:16 19:57:39,419 INFO [DefaultSoapUICore] All plugins loaded 19:57:16 No valid SoapUI NG license exists. 19:57:16 Please enter absolute path of the license file (.zip or .key): 19:57:16 [ERROR] java.util.NoSuchElementException: No line found 19:57:16 [INFO] ------------------------------------------------------------------------ 19:57:16 [INFO] BUILD FAILURE 19:57:16 [INFO] ------------------------------------------------------------------------ 19:57:16 [INFO] Total time: 04:04 min 19:57:16 [INFO] Finished at: 2017-03-11T19:57:39-05:00 19:57:17 [INFO] Final Memory: 38M/277M 19:57:17 [INFO] ------------------------------------------------------------------------ 19:57:17 [ERROR] Failed to execute goal com.smartbear:ready-api-maven-plugin:1.9.0:test (default) on project my-app: Ready! API Test(s) failed: Ready! API Test(s) failed: 19:57:17 [ERROR] No line found 19:57:17 [ERROR] -> [Help 1] 19:57:17 [ERROR] 19:57:17 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. 19:57:17 [ERROR] Re-run Maven using the -X switch to enable full debug logging. 19:57:17 [ERROR] 19:57:17 [ERROR] For more information about the errors and possible solutions, please read the following articles: 19:57:17 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException Re: Executing Ready API composite project via maven Sorry i am new to this. What is composite project? Can you please share pom file i should be using to avoid these problems? Re: Executing Ready API composite project via maven Hey Did you get solution for this problem ?? I am also facing same problem. Here is how my pom.xml looks <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.mycompany.app</groupId> <artifactId>my-app</artifactId> <version>1.0</version> <!--Add the SmartBear Ready! API plugin repository.--> <!--Maven will download the plugin from the specified URL.--> <!--<pluginRepositories> <pluginRepository> <id>SmartBearPluginRepository</id> <url>http://smartbearsoftware.com/repository/maven2</url> </pluginRepository> </pluginRepositories>--> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <!--Plugin groupID used to uniquely identify the project with the plugin.--> <groupId>com.smartbear</groupId> <!--Plugin artifactId used to find the plugin in the project.--> <artifactId>ready-api-maven-plugin</artifactId> <!--Specifies your Ready! API version. Maven will use the appropriate plugin version.--> <!-- IMPORTANT: Must be the same as your Ready! API version.--> <version>1.9.0</version> <executions> <execution> <!--Specifies the lifecycle phase to run Ready! API tests .--> <!--We recommend using the test phase.--> <phase>test</phase> <goals> <!--Do not change. Commands Maven plugin to run a functional test.--> <goal>test</goal> </goals> <configuration> <!--Required. Specifies the path to the project to execute.--> <projectFile>Regression-soapui-project.xml</projectFile> <!--Required for reports. Specifies the format of the report to generate.--> <!--Possible values: PDF, XLS, HTML, RTF, CSV, TXT and XML. Only available in Ready! API Pro. --> <reportFormat>PDF</reportFormat> <!--Required for Maven Surefire reports. Must be true. --> <!--Commands Ready! API to generate JUnit-style reports.--> <junitReport>true</junitReport> <!--Required for Maven Surefire reports. Must be as shown. --> <!--Specifies the folder to store reports in. --> <reports>${basedir}/target/surefire-reports</reports> <!-- ========= Additional elements ============= --> <!--Specifies the name of the test suite to run.--> <testSuite>SmokeTest</testSuite> <!--Specifies the name of the test case to run.--> <!--testCase></testCase--> <!--Specifies the tags to use. Only the test cases with specified tags will be run. Use the syntax below. --> <!--tags><param>TestCase tag1, tag2</param></tags--> <!--Overrides service endpoints specified in the test. --> <!--endpoint></endpoint--> <!--Overrides the host specified in the the test.--> <!--host></host--> <!--Overrides user name for all requests.--> <!--username></username--> <!--Overrides passwords for all requests.--> <!--password></password--> <!--Overrides domain used for requests.--> <!--domain></domain--> <!--If true, commands Maven to create a printed report.--> <!--printReport></printReport--> <!--Sets the output folder for reports.--> <!--outputFolder></outputFolder--> <!--If true, commands Maven to export all requests.--> <!--exportAll></exportAll--> <!--Specifies the SoapUI settings file to use.--> <!--settingsFile></settingsFile--> <!--Specifies the type of WSS password.--> <!--wssPasswordType></wssPasswordType--> <!--Specifies the password for an encrypted project.--> <!--project.password></project.password --> <!--Specifies the password for an encrypted settings file.--> <!--settingsFile.password></settingsFile.password--> <!--Specifies the value of a global property for the test run. Syntax: <variable>=<value>-->--> <!--globalProperties></globalProperties--> <!--Specifies the value of a project property for the test run. Syntax: <variable>=<value>--> <!--projectProperties></projectProperties--> <!--Saves the project after the test run.--> <!--saveAfterRun></saveAfterRun--> <!--If true, commands Maven to continue the test run even when an assertion triggers.--> <!--testFailIgnore>true</testFailIgnore--> <!--Specifies the report type. Only available in Ready! API Pro.--> <!--Click Reporting on Ready! API toolbar to find the list of available repors.--> <!--reportName></reportName--> <!--Enables HTML coverage reports. Only available in Ready! API Pro.--> <!--coverage></coverage--> <!--Specifies the environment to use in the test run. Only available in Ready! API Pro.--> <!--environment></environment--> <!--Provides access to Ready! API properties.--> <!--readyApiProperties></readyApiProperties--> <!--If true, Ready! API will not send usage statistics.--> <!--optOutUsageStatistics></optOutUsageStatistics--> <!-- ========= /Additional elements ============= --> </configuration> </execution> </executions> </plugin> <!--Add Maven Site Plugin to improve test stability and prepare test data for Maven SureFire.--> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> <version>3.5</version> <configuration> <locales>en,fr</locales> </configuration> </plugin> </plugins> </build> <!--Add Maven SureFire Plugin to generate JUnit XML reports.--> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.19.1</version> </plugin> </plugins> </reporting> </project> Issues I am facing: 1. Reports are getting created at pom.xml location 2. All test cases are showing as failed. Below is log on console: Re: Report shows pass even though test case is failed Yes. For all projects i am getting same issue. Can someone please help me to list down steps to configure to run from Jenkin. (Note: Please don't point to SOAP UI Documentation -- its not helping at all) Re: maven integration I am able to generate report by converting this to maven project. this post has everything you need, only thing final report generated is wrong. I am hoping to get ans on this from Pro's. https://community.smartbear.com/t5/SoapUI-NG/Report-shows-pass-even-though-test-case-is-failed/m-p/137518#M31078 Report shows pass even though test case is failed Hi, I am trying to run my SOAP UI project from maven so that I can integrate this in Jenkin. Maven File I am using: <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/maven-v4_0_0.xsd"> <modelVersion>4.0.0</modelVersion> <groupId>com.test</groupId> <artifactId>M1_APIHealthCheck</artifactId> <packaging>jar</packaging> <version>1.0-SNAPSHOT</version> <name>M1_APIHealthCheck</name> <url>http://maven.apache.org</url> <dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>3.8.1</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> </plugin> <plugin> <groupId>com.smartbear.soapui</groupId> <artifactId>soapui-maven-plugin</artifactId> <version>5.1.2</version> <configuration> <!--soapUI project file location--> <projectFile>Regression-soapui-project.xml</projectFile> <!--output file location--> <outputFolder>${basedir}/target/surefire-reports</outputFolder> <!--junit results file--> <junitReport>true</junitReport> <exportAll>true</exportAll> <printReport>true</printReport> </configuration> <executions> <execution> <id>soapUI</id> <phase>test</phase> <goals> <goal>test</goal> </goals> </execution> </executions> </plugin> </plugins> </build> <reporting> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-report-plugin</artifactId> <version>2.19.1</version> </plugin> </plugins> </reporting> </project> Commands I am using to Run this pom file: # Run tests and generate .xml reports mvn com.smartbear.soapui:soapui-maven-plugin:5.1.2:test # Convert .xml reports into .html report, but without the CSS or images mvn surefire-report:report-only # Put the CSS and images where they need to be without the rest of the # time-consuming stuff mvn site -DgenerateReports=false When I executed these 3 commands I can see HTML report is generated( I had only 1 test case in this suite). But even though one of the assertion in test step failed, it says test case passed. Also, I made setting to abort execution if test step fails it still executes it from command prompt with above commands. It works fine in Ready API. Can someone please help me on this? Getting test step status at end of iteration Hi, In My Test Suite I have 1 Test case. This test case has 3 Steps.and I have data loop for these three steps(So Total Steps are now 5 One for Test data one for Data loop and 3 original test cases). At the end of each iteration I want to check which all Test steps got passed/failed and write them to Test properties. Do anyone know how to accomplish this task?