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 you 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 four subfolders, “Databases”, “Packages”, “TestEmails” 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.
For the non-Build Verification tests you will need to set up a website to run your tests against. Add a folder to the “Websites” folder. The website folder should be named according to the version and type you are testing (ex. “DNN050401Community”, “DNN0X0X0XProfessional”). Extract the install zip for the version you want to test into that folder.
Now create a database for the site, the database name should be the same format as the website folder. The Database owner should match the database user in the “TestUsers.cs” file of the DotNetNuke.Tests.UI.WatiN.Common project. You will need to either change the log in information in that file, or add a Database user that matches the information in that file. Update the connection string in the web.config file of your website to match the database you just created.
Create an IIS application for the website, again the application name should match the format of both the website and database (i.e. DNN0X0X0XInstalltype), and point the application to the website folder.
Now access the site in a browser and run the install, if you run a typical or custom install, make sure that you use the admin and host information from the test users file, or update the file to match the new user information of the host and admin. If you run an auto install, once the install is complete make sure you log in as the admin to update the password, again either update it to match the test users file, or update the test users file to match what you enter.
Once the install is complete you can close the site. Now access your database (using SQL server or another program). First make sure you know the path for your database and log files. Once you know this detach (but don’t drop) the database.
Once the detach is complete, create a subfolder in the databases folder with the same name as the database (i.e. DNN0X0X0XInstalltype). Then find the database and log files, and move them into this new folder. Your website is now set up for running the automation tests.
Now that your website is set up you will need to set up a few other things before running your tests. Within the “Packages” folder you will need to add any files that your tests will need. If you are going to run any language tests you will need to add the .zip resource folder for the language you will be testing with. If you are going to run any skin/container tests, add the .zip folder of a skin to the packages folder. Also if you will be running any of the tests that require an image to be uploaded (ex. Adding visible properties to the host accounts) add an image to your packages folder.
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” 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 site. When you enter in the version make sure it is in the format “0X.0X.0X”. The “VersionType” value should reflect the type of DNN installation 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.
The value for “DatabaseName” should match the name of the database you created.

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)”.
Update the other file/package name values to match the files you wish to use from the “Test Files” folder. These values will include: “ImageName”, “SkinFileName”, “SkinName”, “SkinUsed”, “ContainerUsed”, “ForumPackageName” and “TestFileName”.
ImageName is the file name of the image file that will be used for tests that require a image.
SkinFileName is the .zip name of the skin that will be used for the skin tests.
SkinName is the Name of the skin you are using (ie the name you would select from the skins drop down), for example “MinimalExtropy” or “Maple”.
SkinUsed is the specific skin that will be used in any skin tests, for example “Maple - Maple Gold”

ContainerUsed is the specific container that will be used in any container tests, for example “Maple – No Title, Whit BG”.

ForumPackagerName is the package name of the forum module package you are using.

TestFileName is the text file that will be used for testing uploading a file, ex. “Test.txt”.

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.
For the Email Configuration test you will need to add a file to the “Packages” folder. The file is called “mailDrop.xml” and is located in the “Support Files” folder within your project. Copy this file into your “Packages” folder. Open the xml file in a text editor, update the value for “pickupDirectoryLocation” to match the path of your “TestEmails” folder, ex. “D:\Tests\TestEmails”. Save the mailDrop.xml file.

Last edited Sep 14, 2010 at 10:15 PM by philipbeadle, version 2

Comments

No comments yet.