stelle
14 years agoNew Contributor
XPath assertions always fail with maven plugin
I'm hoping to either get some help or wondering if I may need to file a bug for an issue I'm having. I have a test suite created in soapUI and all the tests pass in the UI, but when I run them on the command line with maven, any test that uses XPath is failing. If I were to switch to using the contains assertion, I can make all the tests pass, but contains is not as powerful as XPath.
I can paste all my code, but that might get a little verbose, so let me know if more information is needed. My pom.xml is very basic, I don't change the settings in any way, just tell it the project file to use and where to put logs.
Below is the output of the failing tests. The payload is printed immediately following and the payload is correct. There's no reason that the XPath assertion should fail, so I'm wondering if it's a library issue.
Environment:
windows 7 64 bit
java version "1.6.0_26"
maven-soapui-plugin version 4.0.0
I can paste all my code, but that might get a little verbose, so let me know if more information is needed. My pom.xml is very basic, I don't change the settings in any way, just tell it the project file to use and where to put logs.
Below is the output of the failing tests. The payload is printed immediately following and the payload is correct. There's no reason that the XPath assertion should fail, so I'm wondering if it's a library issue.
Environment:
windows 7 64 bit
java version "1.6.0_26"
maven-soapui-plugin version 4.0.0
[INFO]
[INFO] --- maven-soapui-plugin:4.0.0:test (soapUI) @ HelloWorld_stelle ---
soapUI 4.0.0 Maven2 TestCase Runner
Setting soapui.logroot value C:\Users\stelle\projects\CustomerAPI\CustomerAPI\test/logs/
15:33:43,042 WARN [SoapUI] Missing folder [C:\Users\stelle\projects\CustomerAPI\CustomerAPI\test\.\ext] for external libraries
15:33:43,206 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\stelle\soapui-settings.xml]
15:33:43,880 INFO [WsdlProject] Loaded project from [file:/C:/Users/stelle/projects/CustomerAPI/CustomerAPI/test/testing.xml]
15:33:44,096 INFO [SoapUITestCaseRunner] Running soapUI tests in project [testing]
15:33:44,098 INFO [SoapUITestCaseRunner] Running Project [testing], runType = SEQUENTIAL
15:33:44,106 INFO [SoapUITestCaseRunner] Running soapUI testcase [validatePhoneNumber TestCase]
15:33:44,112 INFO [SoapUITestCaseRunner] running step [ValidPhone]
15:33:44,804 INFO [SoapUITestCaseRunner] Assertion [XPath Match] has status FAILED
15:33:44,804 ERROR [SoapUITestCaseRunner] ASSERTION FAILED -> junit/framework/ComparisonFailure
15:33:44,805 ERROR [SoapUITestCaseRunner] ValidPhone failed, exporting to [C:\Users\stelle\projects\CustomerAPI\CustomerAPI\test/reports/\testing-vali
datePhoneNumber_TestCase-ValidPhone-0-FAILED.txt]
15:33:44,811 INFO [SoapUITestCaseRunner] Finished running soapUI testcase [validatePhoneNumber TestCase], time taken: 685ms, status: FAILED
15:33:44,811 INFO [SoapUITestCaseRunner] Project [testing] finished with status [FAILED] in 710ms
[ERROR] java.lang.Exception: XPath Match in [ValidPhone] failed;
[junit/framework/ComparisonFailure]
Status: FAILED
Time Taken: 685
Size: 560
Timestamp: Thu Aug 11 15:33:44 EDT 2011
TestStep: ValidPhone