TestProject Forum
Powered by leading experts in the test automation community

Can I execute tests through CLI?

Hi,

Currently, I’ve found a workaround approach by utilizing REST API provided here to execute tests on my CI daily basic. Just want to know if the current version of either TestProject agent or server support test execution through CLI? And if so how to do it?

Regards

Hi @xzerosouki,

If you can execute API requests from your CLI, then yes. You can check the API documentation to see how your command should look like if you would send the request using the “curl” command.

Go to the command you want to send and click on the “Try it out” button. Provide the necessary parameters and click on “Execute”. You will then see the exact curl command you need to use. That way, you will be able to send commands through the CLI.

Kind regards,
Amit

Thanks. From that API documentation page, you can include swagger.json link there on top of the page maybe. Here is the .json link I’ve found: https://api.testproject.io/docs/v2/swagger.json. Users can import this json link to their IDE such as Postman so they can work it easily.

Hi @xzerosouki,

Thanks for the suggestion :slight_smile:
I’ll suggest it to the team.

Can I ask what is your use case for that? Why do you need it in a json format?

For ease of use. If you go Petstore API sample page: https://petstore.swagger.io/, you will see .json file is listed there. The purpose is for users to import .json file into the IDE such as Postman and work on the APIs easily rather than doing it on the web interface.

Regards

Thanks @xzerosouki, got it!
I will show it to my team :slight_smile: