Slimdog

The five minute tutorial


1. Download


First you need to download the latest version.

2. Install


Unzip the application to a directory of your choice.

3. create testdirectory


Create a new subdirectory. In this tutorial we will call it mytestcases

4. create simple test


In this short tutorial we are going to request the entry page from google and submit a query.
Save the following text into a file called first.test in the mytestcases subdirectory.

get_html | http://www.google.de
check_title | Google
select_form | 0
set_textfield | q = jConfig
submit_form | btnG
check_text | jConfig

First step is to get the HTML content. Next we check if the title of the page is correct. Then we select the first form. This form contains the textfield where you can put in your query. Then we put in the text we want to find and submit the form. The last step is to make sure that the word we are looking for is present on the next page.

5. run the test


Running the test is simple from the command line:

java -jar webtester.jar -f mytestcases/first.test

This will produce the following output:

Test:........mytestcases/first.test
Duration:....1438ms
Result:......OK

If you get an error here it might be a problem that you are behind a proxy server and therefore put in the following at the beginning:

set_proxy | 10.1.100.12:8080
.... 

6. save result to file


In order to save the result to a file you need to define the filename using the -o argument.

java -jar webtester.jar -f mytestcases/first.test -o result.txt

7. one more test


This test will show how to navigate from page to another.
Please save the following text to a file called javablogs.test:

get_html | http://www.javablogs.com/
check_text | java.blogs
click_link | Hot Entries (last 24 hours)
check_text | Popular Entries in the Last 24 Hours

Now run the new test:

java -jar webtester.jar -f mytestcases/javablogs.test

8. Running a few tests as suite


You can also run all files in a directory as a testsuite. In order to run a testsuite call:

java -jar webtester.jar -d mytestcases

This will produce the following output:

Suite:.......Test
Total tests: 2
Errors:......0
Failures:....0%

Test:........mytestcases/first.test
Duration:....1172ms
Result:......OK

Test:........mytestcases/javablogs.test
Duration:....3359ms
Result:......OK

Note: In order to be recognized as testcase every file must end with .test

9. using a proxy


If you are sitting behind a proxy server then please add the following line at the top of every file.

set_proxy | 10.1.100.12:8080
.... 

Project

Home News

Documentation

Documentation Getting started Simple navigation Testing forms Testing tables Command reference Examples Future plans javadoc

Users

Changelog Downloads Users SourceForge.net Logo