Hi, I'm using beanshell to set the groups from the Jenkins job using a system parameter:
<suite name="UTR_RR_tests" configfailurepolicy="continue">
<test name="UTR_RR_tests" verbose="2" parallel="methods" thread-count="1">
<method-selectors>
<method-selector>
<script language="beanshell">
<![CDATA[
grpParameter = System.getProperty("TestGroup");
groups.containsKey(grpParameter);
]]>
</script>
</method-selector>
</method-selectors>
<packages>
<package name="com.genesys.testing.*"/>
</packages>
</test>
</suite>
:The problem is that I keep getting an error
13:11:36 [ERROR] javax.script.ScriptException: Sourced file: inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' : Undefined argument: grpParameter : at Line: 2 : in file: inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' : ( grpParameter )
13:11:36 [ERROR] in inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' at line number 2
13:11:36 [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
13:11:36 [ERROR] javax.script.ScriptException: Sourced file: inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' : Undefined argument: grpParameter : at Line: 2 : in file: inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' : ( grpParameter )
13:11:36 [ERROR] in inline evaluation of: ``String grpParameter = System.getProperty("TestGroup"); g . . . '' at line number 2
13:11:36 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
I tried to assign a variable, but it didn't help.
Did anyone encounter this?
Thanks!