-1

I'm using soapUi project that run on several environments. In one of my test case i used Message Content Assertion, that work fine, but when i changed the environment in the project (i'm using soapUI pro but it could done by using params) the test fail. how can i redirect the Message Content Assertion path?

Adi Mor
  • 2,145
  • 5
  • 25
  • 44

2 Answers2

1

In soapui pro you can add multiple 'Content Message Assertions' together in an 'Assertion' step. In the 'Assertion' step you can put an OR inbetween the assertions. So if you add a 'Content Message Assertion' for each environment, you will get the same result.

Off course this is a dirty fix and will cost you more maintenance.

0

The answer is, unfortunately, do not use Message Content Assertion. This type of assertion has everything hard-wired, including actual namespaces which could be server specific. It is very difficult to correct this - you would have to edit the project.xml file manually.

To correct this, use individual XPath assertions for the parts of the message that you are interested in, where you are able to use wildcards for namespaces, to make them portable across your environments.

SiKing
  • 10,003
  • 10
  • 39
  • 90