How do I add my own testcase to the e2e/regression test?
First you need to have data. You need a configured project. Copy this configured project with the video/image sequence to the
petrack\tests\regression_test\data folder. Name the video or the folder containing the image sequence the same as your .pet/project file (i.e.
Now run (assuming you're in the data folder)
/path/to/petrack.exe -project YOUR_PROJECT.pet -autotrack YOUR_PROJECT_truth. After PeTrack finished, there should be a
.trc and a
.txt file with the same name as your projet file +
_truth, containing the output of PeTrack.
Next you need to edit
petrack\tests\regression_test\tests\conftest.py. Just add your project name to the param list:
@pytest.fixture(params=["markerCasern", "multicolor", "markerJapan"], scope='session') def petrack_on_testdata(request, pytestconfig):
@pytest.fixture(params=["markerCasern", "multicolor", "markerJapan", "YOUR_PROJECT"], scope='session') def petrack_on_testdata(request, pytestconfig):
You're finished. To see if everything is working correctly you can execute the tests ( assuming you're in
petrack\tests\regression_test\tests just run
pytest --path="/path/to/petrack.exe" ). After that there should be
YOUR_PROJECT_test.txt/.trc files in the regression test data folder.