Forum Discussion
SKoneru
11 years agoContributor
I did try providing <environment> option and it didn't work. The value that I provided does not override with what is saved with the project.
In maven pom.xml file, I defined the environment in configuration section as follows-
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-pro-plugin</artifactId>
<version>4.5.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>Trading-soapui-project.xml</projectFile>
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<outputFolder>${outputdir}</outputFolder>
<settingsFile>../Common/soapui-settings.xml</settingsFile>
<environment>QA</environment>
</configuration>
</execution>
</executions>
In the test case there is a Groovy test step that just prints the environment. Below is the simple Groovy script:-
def env = testRunner.testCase.testSuite.project.getActiveEnvironment().getName()
log.info "environment= ${env}"
This always prints the environment value with what is saved in the project. The value that we provided does not override. I saved the project with environment as "Production", so the
value displays as "Production" rather than "QA".
Can you please validate if this functionality is working.
Thanks in advance.
In maven pom.xml file, I defined the environment in configuration section as follows-
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-pro-plugin</artifactId>
<version>4.5.1</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>Trading-soapui-project.xml</projectFile>
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<outputFolder>${outputdir}</outputFolder>
<settingsFile>../Common/soapui-settings.xml</settingsFile>
<environment>QA</environment>
</configuration>
</execution>
</executions>
In the test case there is a Groovy test step that just prints the environment. Below is the simple Groovy script:-
def env = testRunner.testCase.testSuite.project.getActiveEnvironment().getName()
log.info "environment= ${env}"
This always prints the environment value with what is saved in the project. The value that we provided does not override. I saved the project with environment as "Production", so the
value displays as "Production" rather than "QA".
Can you please validate if this functionality is working.
Thanks in advance.