I’m trying to automatically generate a .pdf file from the completed test .trx file that is generated after every test run. I created a .exe that can take this trx file and convert it into a pdf. The application works fine when i run it on its own, but im having trouble when i try and use it as a cleanup script. The test runs fine, and generated the test results file, but when it runs the cleanup method it cant seem to find the test results file.
I’ve also tried using the AssemblyCleanup() method but that is producing a similar error.
[TestClass]
public static class AssemblyClean
{
[AssemblyCleanup()]
public static void AssemblyCleanup()
{
System.Diagnostics.Process.Start("XMLtoPDFConverter.exe");
}
}
Any help would be appreciated, thanks.
It seems that all that was necessary was to close the solution and reopen it. This seems to of made visual studio recognize the exe file. I have to do the same thing whenever i make changes to the exe file. Also for anyone that runs into a similar issue in the future, I stuck with the AssemblyCleanup() method and that executes just fine after every test run, successful or not.