Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error as 'testplankey' is not recognized as an internal or external command

AbhijitM June 30, 2021

Hi Team,

we are trying to import our testng_results.xml file using curl command by passing the testplankey as a parameter.

The command we are using is -- 

c:\> curl -H "Content-Type: multipart/form-data" -u username:Password -F "file=@testng-results.xml" https://MyServerName/jira/rest/raven/1.0/import/execution/testng?testPlankey=XYZ-257

The output of this command is -- {"error":"Test Execution key or Project key is required."}

When added the ProjectKey to the parameter --

c:\> curl -H "Content-Type: multipart/form-data" -u username:Password -F "file=@testng-results.xml" https://MyServerName/jira/rest/raven/1.0/import/execution/testng?testPlankey=XYZ-257&projectKey=XYZ

we get following error -- 

'testplankey' is not recognized as an internal or external command,
operable program or batch file.

any help would be appreciated here.

1 answer

1 accepted

2 votes
Answer accepted
Sergio Freire - Xblend
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 30, 2021

Hi @AbhijitM ,

please use the url between "".

Also, the testPlankey parameter should be testPlanKey.

Picking your previous command as basis, the following one should work

 

curl -H "Content-Type: multipart/form-data" -u username:Password -F "file=@testng-results.xml" "https://MyServerName/jira/rest/raven/1.0/import/execution/testng?testPlanKey=XYZ-257&projectKey=XYZ"

 

Regards,

Sergio

AbhijitM June 30, 2021

This worked. Thank you @Sergio Freire - Xblend.

Like Sergio Freire - Xblend likes this

Suggest an answer

Log in or Sign up to answer