-
Notifications
You must be signed in to change notification settings - Fork 35
Get started!
What are you getting yourself into?
You are entering the world of continuous testing. This is sort of your own little personal continuous integration system. Instead of building your source, looking up the tests you want to run and then run them you only press save. Saving a file will trigger a build of relevant projects and running all tests related to these projects. Which means that if you want to you can now do your development in your favorite text editor and still have builds and test runs covered. AutoTest.NET should also work with any OS supporting mono.
Initial setup
The first thing you need to do is to get AutoTest.NET. You can either just fetch the latest binaries from the download section or build the project from source. If you choose the binaries just unpack the zip file to any directory (write access is needed for AutoTest.NET within the directory). From there your next step should be the AutoTest.config file (or maybe even README?). Inside the config the most important thing would be the BuildExecutable and the various test runner settings like NUnitTestRunner, MSTestRunner and XUnitTestRunner. First of the BuildExecutable setting supports monos xbuild and Microsofts MsBuild. If you want to you can actually specify different versions of MsBuild for VS 2008 and VS 2010. If you leave out the BuildExecutable setting all together AutoTest.NET will stop tracking file changes and start tracking changes to assemblies so you can use Visual Studio to handle builds. Next you would want to set the test runner of your choice to wherever you have it located. That would be all changes required to get started.
Running your first build and testrun
After doing the initial configuration you can start the AutoTest.NET console or winforms application. When starting up the application it will ask you to set a watch directory. In both console and winforms app you can specify watch directory as the first command line parameter. The watch directory will usually be your solution folder. The watch directory is the top directory from where AutoTest.NET recursively looks for file/assembly changes.After setting the watch path you can go ahead and change a file in your project. As soon as you save it you should see AutoTest.NET detecting changes, building and running tests. If you have choosen assembly tracking you would not save the file but build your project in Visual Studio.
What is going on?
To get a bit of information about what is going on there are a couple of sources of information. Inside the winforms app there is a button at the top right. This button will take you to the application messages windows. This window shows you some usefull info about how AutoTest.NET is configured and will keep you informed when anomalies happen. If you really want to get under the hood of what’s happening you can turn on logging and the application will start logging to the debug.log file in the AutoTest.NET directory. Hopefully this will help you if something doesn’t behave like you would expect it to.
Getting started with the Visual Studio plugin
First off you would want to install the plugin. Run the Install_Visual_Studio_Addin.bat script with administrator privileges. This should install the plugin to both VS 2008 and VS2010. Now try opening a solution in Visual Studio. After opening the solution in visual studio go to Tools→AutoTest.NET and you should get the addin window. From here on it’s the normal way of working with AutoTest.NET. When getting a build error or failing test you can right-click on the line to get detailed error information. You can also double click on the list item to go to the right file and line.