ContributionsMost RecentMost LikesSolutionsRe: Identify Security tests in a TestRunListener.afterRun listener Hi Olga, The use case I have is a little different from what you stated. End of Functional test run -> Only TestRunListener.afterRun should be invoked -> This works End of Security test Run -> Only SecurityTestRunListener.afterRun should be invoked. -> BothTestRunListener.afterRun andSecurityTestRunListener.afterRun are getting invoked. I added the target ^((?!Security).)*$ to theTestRunListener.afterRun and ran the Security test namedSecurityTest 10 Here are the logs at the end of a Security test. It runs the TestRunListener also. Wed Aug 21 14:14:08 MDT 2019: INFO: #######Normal Test Run Listener script####### Wed Aug 21 14:14:08 MDT 2019: INFO: Test case name : GETVersion200 Test Suite Name : Version Wed Aug 21 14:14:08 MDT 2019: INFO: Time Taken: 6079 Run Status : PASS Status: Passed Wed Aug 21 14:14:10 MDT 2019: INFO: #######Security Test Run Listener script####### Wed Aug 21 14:14:10 MDT 2019: INFO: Name : GETVersion200 Wed Aug 21 14:14:10 MDT 2019: INFO: Test case name : GETVersion200 Test Suite Name : Version Wed Aug 21 14:14:10 MDT 2019: INFO: Time Taken: 6079 Run Status : PASS Status: Passed Identify Security tests in a TestRunListener.afterRun listener I want to handle afterRun events for normal tests and security tests separately. I tried implementing the below two listeners. TestRunListener.afterRun SecurityTestRunListener.afterRun I expected these to be mutually exclusive. However, theTestRunListener.afterRun seems to get triggered at the end of Security tests as well. I tried identifying security tests with the name of the test case. But the below statement in the TestRunListener.afterRun gives the name of the functional test even at the end of the security test. log.info(testRunner.testCase.getName()) I expected to get something like 'SecurityTest 10'. But received 'GETVersion200' (name of my functional test). How do I differentiate a functional test run from a security test run in theTestRunListener.afterRun listener? SolvedUseless Headers in body of REST POST while adding attachmentI am trying to post some attachments through a REST request. I have a dynamic list of files and I am sending files one at a time by attaching them to the request. I am highlighting the portion I do not want in the request body. The file content is below the glowing portion. I am not able to paste all file content here. Why do we have the glowing part of the request? How do I get rid of it? I am adding my own headers as necessary. Here is what I see in the Raw Request. POST http://URLIamTryingTopostTo HTTP/1.1 Accept-Encoding: gzip,deflate MIME-Version: 1.0 Cookie: WebSessionId=29572FC43B96EB9299DFFA6F8435388560C55B78AA506B41185226997D1C3E73 Content-type: application/octet-stream Content-Disposition: attachment; filename="Thumbs.db" Content-Length: 34049 Host: transfer.int.discoverysphere.ci.thomsonreuters.com Connection: Keep-Alive User-Agent: Apache-HttpClient/4.1.1 (java 1.5) [glow]------=_Part_290_2042867758.1409938087944 Content-Type: application/octet-stream; name=Thumbs.db Content-Transfer-Encoding: binary Content-Disposition: form-data; name="Thumbs.db"; filename="Thumbs.db"[/glow] ÐÏ à¡± á