Forum Discussion
In requestFilter.FilterRequest:
String tcName = testRunner.getTestCase().getName()
log.info "test case name is " + tcName
String str2 = new String("forbidden")
if (!tcName.toLowerCase().contains(str2.toLowerCase()) )
{
log.info "allowed"
// handle event
}
else
{
log.info "forbidden"
// well...Bye!
}
Hey thank you for that code, I'm running into an issue when I'm running the event script with a test case and I'm trying to get the test case name.
(see photo)
Do I need to import some type of package in order to use "testRunner"?
- nmrao7 years agoChampion Level 3
- stewmoon7 years agoOccasional Contributor
hi nmaro,
Thank you very much for that solution that fixed my issue with getting the test case name when not using the testrunner.
I have two questions:1. What resources did you use to get this answer? I looked at the http://www.soapui.org/apidocs/overview-summary.html to try and find what methods are avaiable for that class, but was unable to find the solution there.
2. How can I check if there is already a Header named "X-Active-Customer-ID" present within the request.
thank you!!- nmrao7 years agoChampion Level 3Glad that helped.
Rearding #1, please go thru thread below:
https://community.smartbear.com/t5/SoapUI-Open-Source/How-to-read-and-use-SoapUI-API-for-non-Dev-people/td-p/108191
Regarding #2, encourage you to create a new thread with details.
Related Content
- 5 years ago
- 3 years ago
- 5 years ago
Recent Discussions
- 5 days ago
- 10 days ago