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!
}
- stewmoon7 years agoOccasional Contributor
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!!
Related Content
- 5 years ago
- 3 years ago
- 5 years ago
Recent Discussions
- 18 days ago