cancel
Showing results for 
Search instead for 
Did you mean: 

What is testPassErrorsSuccess property?

Highlighted
Frequent Contributor

What is testPassErrorsSuccess property?

Hi,

in my soapui project, i added a groovy step where i try to get the test status.

try{
def A = "Hello"
assert slurper.data.DOC.ACT[0].toString() == A
testRunner.testCase.testSuite.project.setPropertyValue("statusPass_A",'TEST PASS')
catch (AssertionError e){
testRunner.testCase.testSuite.project.setPropertyValue("statusFail_A",'TEST FAIL')
log.info context.getTestRunner().fail("ERROR")
}
}

 

The result is:

when the test pass, it creates the property "statusPass_A" with "TEST PASS"

But it creates also another property named testPassErrorsSuccess with "TEST PASS"

 

Where does it come from?

Is it soapui inbuilt propety?

 Thank you

5 REPLIES 5
Community Hero

Re: What is testPassErrorsSuccess property?

Not sure of the use case, why is it needed in groovy? Haven't had a chance to see such use case.


Regards,
Rao.
Frequent Contributor

Re: What is testPassErrorsSuccess property?

A json content is retrieved from a talble with a groovy step.

Then it 's just parsing a json file.

It asserts some data in json file.

If the assertion is true it says test pass

otherwise test failed. that's all.

 

It's needed in groovy because i generate a pdf report where i can see test status for each test.

It works well for me.

 

But i don't understand why sopaui creates a property itself named: testPassErrorsSuccess

I definitely not create this property. 

Community Hero

Re: What is testPassErrorsSuccess property?

Thank for the details.

If I understand write, instead of jdbc test step, a groovy script test step is retrieving data.
And where do you have assertion? In the same groovy script?

Glad to know that you create pdf file for the report. But would be glad if you can share more details on how that is done? Or a sample dummy project do the same can be useful.

Not sure how you are trying to get the status, probably you may want to take a look at the below thread which was some time ago and see if that is useful.

https://stackoverflow.com/questions/41700437/creating-a-test-report-from-project-level-tear-down-scr...


Regards,
Rao.
Frequent Contributor

Re: What is testPassErrorsSuccess property?

If I understand write, instead of jdbc test step, a groovy script test step is retrieving data.

Yes you are right i'm not using JDBC test step, is it a problem?


And where do you have assertion? In the same groovy script?

Yes

 

 

The pdf report is a very basic use of itext library with java.

https://www.vogella.com/tutorials/JavaPDF/article.html

 

Your link describe a groovy code which generates a test result with very basic details.

 

I think if i found a solution with log4j in /bin folder where we can configure to get all details.

i'm trying ...

i will let you know. 

Community Hero

Re: What is testPassErrorsSuccess property?

Thank you for the details.
The link i gave is to help to get the status of steps ( not for generating report point of view).


Regards,
Rao.
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors