I am using TestNG framework to automate mobile application. I want to capture endpoint url.
-
1Are 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.– CherreeCommented 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.– Paddy02Commented 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.– CherreeCommented Nov 2, 2017 at 7:07
-
Yes...I'm looking for the tool/solution like browsermob.– Paddy02Commented Nov 2, 2017 at 7:34
Add a comment
|
2 Answers
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.
-
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?– olyvCommented Dec 9, 2017 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