vitsvg
11 years agoOccasional Contributor
Can't create assertions for AssertionTestStep
Hi there,
I'm using soap UI Pro 4.6.1. and adding ProXPathContainsAssertion (or XPathContainsAssertion) to the AssertionTestStep by using the following code:
def testStep = testCase.testSteps["NameOfTheStep"];
def assertion = testStep.addAssertion("XPath Match");
assertion.name = "NameForAssertion";
It fails with the java.lang.NullPointerException: Cannot set property 'name' on null object.
It tells me that the method of assertion creation (addAssertion) returns null.
If I use the target test case of a different type (e.g. Http Test Request Step) then it works fine without any issues.
I had once the assertion addition worked for me for the AssertionTestStep by incident and then it started to fail again.
Can you please advise if there are any known issues with this step?
Is there an issue in the 4.6.1. version?
I'm using soap UI Pro 4.6.1. and adding ProXPathContainsAssertion (or XPathContainsAssertion) to the AssertionTestStep by using the following code:
def testStep = testCase.testSteps["NameOfTheStep"];
def assertion = testStep.addAssertion("XPath Match");
assertion.name = "NameForAssertion";
It fails with the java.lang.NullPointerException: Cannot set property 'name' on null object.
It tells me that the method of assertion creation (addAssertion) returns null.
If I use the target test case of a different type (e.g. Http Test Request Step) then it works fine without any issues.
I had once the assertion addition worked for me for the AssertionTestStep by incident and then it started to fail again.
Can you please advise if there are any known issues with this step?
Is there an issue in the 4.6.1. version?