My favorites | Sign in
Project Home Downloads Wiki Issues Source
Project Information
Members
Featured
Downloads
Wiki pages

What is it

AntSys is a lightweight and powerful system test framework built on top of ANT.

It is designed to be easy to use and extendable. Users can create test cases in xml file without writing single line of code.

Documentation

  • For the 5 minute introduction, take a look at the GettingStarted page.
  • In AntSys test script, your can use AntSys Tasks and all ANT built-in Tasks.
  • For a more in depth introduction to AntSys, please see the Design of AntSys

Quick Example

The following example is a system test to test echo command:

<project name="antsys-systemtest" basedir="." default="systemtest">
  <target name="systemtest">
          <!-- this test suite is using AntSys to test echo shell commands --> 
         <testsuite name="CommandTestSuite" failonerror="false" todir="./report" htmlreport="true">
              <!-- test echo command output -->
              <testcase name="echo_test">
                  <!-- create working dir for testing -->
                  <mkdir dir="work"/>
                  <!-- use echo to create a test file -->
                  <exec vmlauncher="false" executable="echo" output="work/test.dat">
                       <arg value="testmessage"/>
                  </exec>
                  <!-- check the file exists or not -->
                  <assertfileexist file="./work/test.dat" errormsg="should generate test.dat" />
                 <assertfileexist file="./work/test.error" negative="true" errormsg="shouldn't generate test.error" />
                  <assertfilegrep file="./work/test.dat" regexp="^test" errormsg="should start with test" />
                  <assertfileequal expectedfile="./work/test.dat" actualfile="./work/test.dat"/>
                  <delete dir="work"/>
              </testcase>
        </testsuite>
   </target>
</project>

To run your system test:

  • use ant -f systemtest.xml to run all tests
  • or use ant -Dtestcase="you_testcaes_name" -f systemtest.xml to just run single test case

Powered by Google Project Hosting