I am using TestNG framework to automate mobile application. I want to capture endpoint url.

  • 1
    Are your automated tests running against something like a rest API or against a GUI frontend (browser, mobile app, etc.)? I think your answer is going to vary quite a bit depending on what other tools you're already trying to use besides TestNG in these testcases. – Cherree Nov 1 '17 at 13:13
  • I am automating mobile application by using TestNG framework. There are few webservices call in my application, so I want to capture webservice request and response. – Paddy02 Nov 2 '17 at 5:38
  • Thanks @Paddy02, if I understand the problem then it sounds like you're probably looking for a tool like Browsermob (git repo) in addition to TestNG + whatever library you're using to to drive your mobile application actions. – Cherree Nov 2 '17 at 7:07
  • Yes...I'm looking for the tool/solution like browsermob. – Paddy02 Nov 2 '17 at 7:34

Using RestAssured this can be achieved. You can create a method which should have you request body and required headers. Pass the data in required format (as RestAssured Expects) The outcome of this can be put in Response class of RestAssured.

| improve this answer | |
  • he wants to see endpoint url and you suggest using RestAssured framework. Correct me if I am wrong but how are those two things related? – olyv Dec 9 '17 at 16:37

If you are running tests on simulator, you can use any sniffer like Fiddler, Charles or mitproxy (which is free) to see endpoints and requests-responses details

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.