[TIP] pytest from Python code
DBalima at slb.com
Mon Jul 2 05:47:32 PDT 2012
I have 2 questions about pytest, I want put result files in a directory by calling pytest from python code directly.
I have seen there is pytest.main() to do this, but I don't know how.
This is what I have.
Test file is here : c:\tests\class_a\mytest.py
I want put the result files(xml) here : c:\tests\class_a\test-result
Question 1 (with a class):
I have this class :
pytest.main("-qq", plugins=[ClassATest()],['junitxml',' c:\tests\class_a\test-result '])
Question 2 (without a class):
I have this :
pytest.main("-qq", ['junitxml',' c:\tests\class_a\test-result '])
I have do this, but it doesn't work.
How can I make it works?
Auto Test Team
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python