I am writing python unit tests that test the REST API, which should work like another process.
A REST server is a tomcat application that I call from the shell to run in development mode, so what I want to do in a python test:
- Start the server, return when the server is up.
- Running unit tests
- Send the server Ctrl+Dto shut down gracefully.
Is there a way to use one input point for python so that the server starts up and unit tests run all from a single python script call?
I am looking at the python subprocess and multithreading in python, but I still don't quite understand how to get there.
For acquaintances, this is the Atlassian JIRA plugin that we are developing, therefore the actual shell command is "atlas-run".
source
share