Subscribe by Email

Friday, February 22, 2013

Explain SlimDog - Web Functional/Regression Test Tool

About SlimDog

- SlimDog is a web application testing tool that is based on simple script i.e., the httpunit. 
- The tool comes with a range of commands that help you to work with forms, navigating between the web pages and checking the table contents. 
- The hard task of writing lengthy xml files and JUnit test cases, the slimdog allows the users to create simple text scripts. 
- Each command is a test node that is contained in every line of the script.
- As such all commands contained in a file are treated as a test case and processed as the same. 
- Every command has a syntax that is quite simple as well as easy to learn. 
- If you want, you can form a test suite by combining several test scripts. 
- The results of the tests executed are written as an html page or file to the console. 

How to use SlimDog?

- To use slimdog, firstly you need to download its latest version from its web site. 
- The application will be in zipped form. 
- You need to extract the files to a directory of your choice. 
- Next step is to create a test directory. 
- After this you can start creating tests and save them in the test directory you just created. 
- After you have created the test, your next step is to get the html content. 
You can run the tests from the command line. 
- After obtaining the results save them to a file. 
- Be careful that the file in which you are saving the result should be defined using the –o argument. 
- You can even navigate from one page to another. 
- All files in the test directory can be run as a test suite. 
- Every test case file must end with .test extension so that it becomes recognizable.
- You can even use a proxy. 
- The slimdog commands can even be used with the JUnit test cases.

- However, running a test case is the easiest way. 
- Firstly, the web tester needs to be instantiated and all commands need to be added through the parse line method.
- You do not have to worry about the syntax since it is the same as that of the script files. 
- After this runtest() method can be called and web test results can be obtained. 

General SlimDog Commands

Below we shall mention some general slimdog commands:
  1. Get_html: This command is for establishing a connection with the given URL and thus reading its content. The read content then can be used later. The parameter to this command is the URL itself and it supports variables.
  2. Check_title: Parameter for this command is the required title and it is of the type test. The title of the page that you specify is checked against the given title. There is one thing about this test which is that if it fails, the entire test will fail.
  3. Set_proxy: The parameters for this command are the proxy port and host. It is of the type command.
  4. Check_link (missing): The parameter for this command is the text within the tag and this one is also of the type test.
  5. Check_text: The text to be found is passed as a parameter to this command and it is of the type test.
  6. Click_link: The argument for this is the text within the tag. It is of the type command.
  7. Seturlprefix: The parameter here is the URL prefix. This URL prefix is used as the base URL for other tests. It is of the type command.
  8. Enable java_script: Parameter is either true or false. This command disables and enables the JavaScript based on the argument passed.

No comments:

Facebook activity