Initial Set Up
The latest version of the DNN Automation tests will be on codeplex. Download this onto your computer. Once you have the project on your computer you will need to set up a few folders before running the test.
First open SQL server Management Studio and connect to the server you will be using for the tests. Please note that the tests will not run on SQL Express, so do not connect to SQL Express. In the object Explorer right click on the server and click Properties. Select the Security Page. Ensure that SQL Server authentication is enabled by selecting “SQL Server and Windows Authentication Mode” and click OK. Exit out of SQL Server.
You will need to create a test root folder. Create this folder in a drive and name it “Tests”, within this folder you will need to make five subfolders, “Databases”, “Packages”, “TestEmails”, “Screen Captures” and “Websites”. Please note the “TestEmails” folder needs to be empty at all times. The email tests will temporarily add files to this folder, but they will be removed immediately.
Within the “Packages” folder you will need to add the .zip folder for any of the install or upgrade packages you will be testing. If you are going to be testing upgrade packages you will also need to add at least one of the pre-made test site .zip folders.
Once you have created the folders you will need to open the app.config file for the project that you will be running tests on. The fields listed in the app.config file will need to be updated to match the folders you created.
The “TestRoot” value should be set to the path for your “Tests” folder, ex. “D:/Tests”. The “DatabasePath”, “PackagePath”, “TestEmailPath”, “ScreenCapturePath” and “WebsitePath” values need to be set to the subfolder names you used above, they should be set to these values by default. The “TestVersion” value should be set to match the version of your install/upgrade packages. When you enter in the version make sure it is in the format “0X.0X.0X”. The “VersionType” value should reflect the type of package you will be testing, this should be either “Professional” or “Community”. Update the “DatabaseServer” value to match the server you will be using to run your tests on.
For any tests that require packages or files there are some packages and files within the “Test Files” folder of the solution, if you wish to use a package other than the ones included in that folder you will need to add them to “Test Files”.
You will need to update the “TestFilesPath” to match the location of the solution on your computer, for example C:\Projects\WatiN Tests\Test Files.

If you are running any language tests update the “LanguagePackage” field to match the name of the language package in the “Test Files” folder that you wish to test with, make sure you include the .zip extension at the end of the folder name. For language tests you will also need to update the “LocaleName” value to match the locale of the language you will be using, ex. “Français (Canada)”.
To run the Email Configuration test you will need to update the “TestEmailPath” value to match the name of the subfolder you created, again if you used the same names as specified you should not actually have to change this value.
Once all the fields have been updated save the app.config file.
Each of the tests has row attributes, and you can update these depending on how you want your test to run. The row attributes decide what database to run your tests against. Databases will only be available if you run the install or upgrade test that creates them. You can change these attributes from the files “InstallList.csv” and “UpgradeList.csv”. These files list the install and upgrade tests that will be run. Any other tests you run will be run against the databases from each of these install/upgrade tests.
The install file entries should be in the format “”, “Typical”. The first string is intentionally empty, and the second string is the type of install you wish to run.
The upgrade file entries should be in the format “04.09.03”, “2”. The first string is the version of the site you wish to run the upgrade against, and the second string is the number/type of the pre-made websites that will be upgraded. This should be the same version and number of the packaged website .zip folder you placed in the “Packages” folder. Professional edition test beds are labeled slightly different from their community counterparts. Pro edition test bed zip files will end with “Pro”, if you will be testing a Professional edition test bed make sure you include the “Pro” in the upgrade file entry that specifies the type of test bed. For example if I wanted to use test site DNN5232Pro.zip the entry in the upgrade list would be: “05.02.03”, “2Pro”
Optional Test Modifications
Your tests should be ready to run as is. However a few changes can be made depending on how you wish to run the tests.
Within the app.config file there are a few other test settings you can edit. The browser settings will change how the browser behaves. If you wish to run the test without seeing it run within a IE window set “SilentMode” to true. You can also set up video and screen captures by setting both of the “enabled” values to true.
Most of the test files contain a “DependsOn” field near the top of the file. New dependencies can be added, but for the tests that depend on either the install or upgrade tests make sure that you leave at least one of those dependencies.
Running the Tests
To run the tests open up the project and open the Test List Editor window (Test->Windows->Test List Editor). Check the checkbox next to any of the tests you wish to run and then click on the “Run Checked Tests” button in the top left of the Test List Editor window.
Certain tests will depend on other tests, for example adding a user depends on the upgrade and install tests completing successfully. If you wish to run a test that depends on another you will need to run both of the tests. Otherwise your test will never run.

Last edited Sep 14, 2010 at 10:13 PM by philipbeadle, version 1

Comments

No comments yet.