Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

<- Previous Step: Step 2 - Getting The Code

If you've installed all of the optional tools described on Step 1 - How To Set Up Your Development Environment then you can automate your build and test process.

Using Ant, Selenium, and CubicTest, this can start up and test the base build to see that everything is working from scratch.This is the preferred way to do testing -- automated tests are much more thorough than anything an individual can do.

  1. Make sure that you DON'T have anything important in your MySQL database named "wsttemptest" nor "wsttemptestsurvey". These MySQL databases will be wiped clean every time you launch the test framework. Also make sure that you DON'T have a launch profile in Eclipse that's named "websurveytoolbox" nor "wsttemptestsurvey" because these will be overwritten in this automatic build process.
  2. In Eclipse, open the SeleniumCubicTest project. Run "tomcatFromScratch/antTomcatFromScratch.xml" as an ant build -- follow the prompt and build the .war file as it specifies. Wait until the build completes (you may have to check the console). If it fails you may have to edit the build.properties in tomcatFromScratch
  3. In Eclipse, go to the "Servers" view and start up Tomcat (sometimes this works better in Run mode, not Debug mode, because sometimes Debug mode will get into perpetual restarts which can get in the way).
  4. Open "SeleniumCubicTest/tomcatFromScratch/TestFromScratch.aat". Right click, "Run As..." -> "Run CubicTest with Selenium".
    1. If you want to test the Survey Manager survey creation (which mostly needs testing by hand), you can alternatively run TestSurveyManagerFromScratch.aat -- which includes the same initialization as TestFromScratch.aat.
  5. Watch the test fly by!

You may want to add your own tests for new features you develop -- you may want to put these in your own test file or add them to TestFromScratch.aat.

Now that you've run the test build, learn about Adding to the Selenium Automatic Test .

Next Step -> Step 4 - Learn About The Architecture
  • No labels