cancel
Showing results for 
Search instead for 
Did you mean: 

Getting 404 using Groovy but works well with manual hit

Highlighted
Established Member

Getting 404 using Groovy but works well with manual hit

Can someone help me on -

i am trying to run a test step ( in the same testSuite)  using groovy script, the teststeps is executing but its failing and giving 404 

whereas when doing a manul hit on the test step , its passing.

i tried putting waiting time but it did not help me.

 

I am using below steps to run a test step

def val = testRunner.testCase.testSuite.getTestCaseByName("ABC").getTestStepByName("XYZ")

val.run(testRunner, context)

2 REPLIES 2
Community Leader

Re: Getting 404 using Groovy but works well with manual hit

Hi @viki3110 ,

 

Can you please share any screenshot of request and response, because the syntax you are using seems correct to me.

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
Community Hero

Re: Getting 404 using Groovy but works well with manual hit

Probably something to do with the context you are running the test under. I may be able to help but you'll need to post your project.

 

Make a copy of your project.

Open the copy and delete anything not related to this problem.

Create a mock service for the interface you are having problems with.

Set the end point for the failing test case to the mock service.

Make sure you can reproduce the issue against the mock service.

Post the project here as an attachment.

New Here?
Join us and watch the welcome video:
Watch the New Interview
APITestingMistake#2
Top Kudoed Authors
Top Kudoed Posts