cancel
Showing results for 
Search instead for 
Did you mean: 

Basic test step with regex (regular expression) is not working

SOLVED
New Contributor

Basic test step with regex (regular expression) is not working

I want to start using the test cases for my web services. I created my first one and implemented a very simple regex and it's not working. I know how to use regex and this expression in my attached image works fine when put into other regex tools. But soap ui keeps saying the test is failing as it cannot find a match. Any suggestions? Thanks in advance.

Todd

 

2017-07-06_19-33-04.png

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super Contributor

Re: Basic test step with regex (regular expression) is not working

The Contains Assertion with regular expression seems to assert a match of the entire response message. You can add .* wildcards at the start and end of your specified token as in the online help example.

 

https://www.soapui.org/functional-testing/validating-messages/getting-started-with-assertions.html#3...

3 REPLIES 3
Super Contributor

Re: Basic test step with regex (regular expression) is not working

The Contains Assertion with regular expression seems to assert a match of the entire response message. You can add .* wildcards at the start and end of your specified token as in the online help example.

 

https://www.soapui.org/functional-testing/validating-messages/getting-started-with-assertions.html#3...

New Contributor

Re: Basic test step with regex (regular expression) is not working

Yes, that seems to work when I used the wild card. There are some odd things about the regex. For example, I normally look for a space like this -->  \s  

 

But when I try that, it didn't work. Maybe smart bear has slightly different functionality for their flavor of regex. 

Occasional Contributor

Re: Basic test step with regex (regular expression) is not working

Yes, it is a little bit different.  Documented here:

https://support.smartbear.com/testcomplete/docs/reference/misc/regular-expressions.html

 

New Here?
Join us and watch the welcome video:
Top Kudoed Authors