2

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

4
  • 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
    Commented Nov 1, 2017 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
    Commented Nov 2, 2017 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
    Commented Nov 2, 2017 at 7:07
  • Yes...I'm looking for the tool/solution like browsermob.
    – Paddy02
    Commented Nov 2, 2017 at 7:34

2 Answers 2

1

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.

1
  • 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
    Commented Dec 9, 2017 at 16:37
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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