cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Contributor

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:

1.png

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

I finally used projectProperties to do this.

View solution in original post

6 REPLIES 6
Highlighted
Community Hero

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

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?



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Contributor

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

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>
Highlighted
Community Hero

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

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?



If my answer helped please click on the 'Accept as Solution' button.
Highlighted
Moderator

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

Hi all,

 

@白夜有点黑 , have you found a solution? If you have not, could you please check whether using a DataSink step helps as Lucian suggested?

We are looking forward to hearing from you.

 


Olga Terentieva
SmartBear Assistant Community Manager

Highlighted
Contributor

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

I finally used projectProperties to do this.

View solution in original post

Highlighted
Moderator

Re: How to overrides testCaseProperties like projectProperties or testSuiteProperties in pom.xml fil

Thanks for getting back with the solution, @白夜有点黑 !

 

 


Olga Terentieva
SmartBear Assistant Community Manager

New Here?
Join us and watch the welcome video:
Announcements
TechCorner Leaderboard
Want a fun and easy way to learn ReadyAPI and show off your skills? Try solving weekly TechCorner challenges and get into the Leaderboard!


Challenge Status

Compare an expected JSON value and actual response in Events

Participate!

Fetch value/data from JSON response using Groovy Script

See replies!

Filtering data retrieved from a DataSource

See replies!

Get data from Petstore and add it to Excel sheets

Participate!
Top Kudoed Authors