I'd like to be able to automatically run all the tests when my test harness app starts (e.g. to run unit tests from a command line after a project build). Is there any way to do this?
Cheers,
Trev.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Are you refering to running the GUI frontend from the command line? If so, have you tried checking the "Automatically Run Tests" box on the GUI? Or are you using some other reporting mechanism?
Kelly
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
From a design standpoint, I'm not sure if I like this approach. I'd prefer a RunTests() method that I could manually call from the form at startup. This way, I wouldn't have to worry about making sure the checkbox was checked before running the tests from a command line script.
In the end, I'm aiming at a GUI-less unit test app that is run as part of the build process - test results would be logged to the build log file. A RunTests() method would make it a lot easier.
Thanks for the great work... it really is a masterpiece.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I understand what you're saying. You can build your own GUI-less test-runner and just use a reference to the SimplyVBUnitLib DLL. That would cut out the entire GUI side. For instance, I included a simple non-gui project that just runs in a module and outputs to the immediate window.
If you want to keep the GUI side still, you could create a new TestSuite object and add your tests to that instead of using AddTest. After all the tests are added you could run the test suite directly if you ran the app with a command-line parameter or you could add that TestSuite object to the AddTests method and let the GUI run it.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'd like to be able to automatically run all the tests when my test harness app starts (e.g. to run unit tests from a command line after a project build). Is there any way to do this?
Cheers,
Trev.
Ok ok, you can use the great hack of SendKeys "{enter}" in the Form_Load event to hit the run button! That's just funny, but it works heh.
Hello,
Are you refering to running the GUI frontend from the command line? If so, have you tried checking the "Automatically Run Tests" box on the GUI? Or are you using some other reporting mechanism?
Kelly
Aha... thanks... that worked.
From a design standpoint, I'm not sure if I like this approach. I'd prefer a RunTests() method that I could manually call from the form at startup. This way, I wouldn't have to worry about making sure the checkbox was checked before running the tests from a command line script.
In the end, I'm aiming at a GUI-less unit test app that is run as part of the build process - test results would be logged to the build log file. A RunTests() method would make it a lot easier.
Thanks for the great work... it really is a masterpiece.
I understand what you're saying. You can build your own GUI-less test-runner and just use a reference to the SimplyVBUnitLib DLL. That would cut out the entire GUI side. For instance, I included a simple non-gui project that just runs in a module and outputs to the immediate window.
If you want to keep the GUI side still, you could create a new TestSuite object and add your tests to that instead of using AddTest. After all the tests are added you could run the test suite directly if you ran the app with a command-line parameter or you could add that TestSuite object to the AddTests method and let the GUI run it.