Forum Discussion

白夜有点黑's avatar
白夜有点黑
Contributor
6 years ago

How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml file?

I want to run soapui with Maven, but has problem here and can't find any solution on the internet, want to know: How to overrides testCaseProperties just like projectProperties or testSuiteProperties in pom.xml file?

 

Reference: https://github.com/redfish4ktc/maven-soapui-extension-plugin/wiki/Tips

 

Screenshots as below:

 

 

  • Lucian's avatar
    Lucian
    Community Hero

    Hi,

     

    I think this is a pretty uncommon scenario. I don't know if this is possible out of the box but maybe we can find something else that would work for you. Can you elaborate on what you are trying to achieve?

    • 白夜有点黑's avatar
      白夜有点黑
      Contributor

      I want to assign value to testcase properties (hat_id) when run "mvn test -P Test -Dhat_id=789" command, here is pom.xml file like below:

       

      <profile>
      <id>Test</id>
      <activation>
      <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
      <environment>TEST</environment>
      <projectFile>hfa-tracker-soapui-project.xml</projectFile>
      <testSuite>TS_SendHFARequest</testSuite>
      <testCase>TC_SendIMPRequest</testCase>
      <hat_id>456</hat_id>
      </properties>
      </profile>
      • Lucian's avatar
        Lucian
        Community Hero

        I understand that you want to assign values to test case properties. The question is why can't you use test suite properties? Also, why do you want to pass something like a hat_id through maven? What is the use case here?

         

        How about using a DataSink step?