<div dir="ltr">Hi,<div><br></div><div>I have a requirement where in i want to start pytest from a microservice framework.</div><div><br></div><div>So the user will be sending a restAPI request and based on that i should be able to do the service will start a pytest session.</div><div><br></div><div>i have couple of questions on how to achieve this.</div><div><br></div><div>1. All pytest invocations i see is from cmd line.. can i invoke the pytest run from within another piece of code?</div><div><br></div><div>2. If yes then can i run it as a seperate thread/process all together from the service?</div><div><br></div><div>3. If yes to that also.. suppose i want to handle rest requests like stop testrun in between how do i achieve it.. i dont want to kill the thread.. once the ongoing test is completed then i should stop the execution gracefully. python threading library offers event objects to achieve such things.. i am not sure if i will be able to do such things in a conftest.py..</div><div><br></div><div>Regards</div><div>Arun Kaliraja.B </div><div><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">அன்புடன்,<br>
பா. அருண் காளி ராசா </div>
</div></div>