Selenium Key Word Automated Testing Framework

  • Skip to end of metadata
  • Made by Chris Kretler, last changed by Kent Fitzgerald on Jan 1-5, 2014 Go to begin of metadata

Overview

The Keyword Framework was created to expand automated operational testing into a broader selection of users, also to make people familiar with Selenium training online automation more successful.Selenium tutorial online is an open – source.

The Theoretical Model empowers users to make test instances in a pipe-delimited format, which is read by the selenium webdriver online training framework and passed on to the webdriver automated testing software as an automated script. Users establish their activities in simple terms understood by the framework, eliminating the requirement to learn a complicated programming language.

Instructions for Creating Evaluations

Please locate a sample script here. Scripts contain series of commands that tell the framework how to examine the program. These commands are pipe-delimited, with selenium training online one-line per command. The very first item on a line should be a recognized key word.

The listing of accepted key words can be found here. A good way to produce a script is to walk by way of a guide test-case, selenium online training developing a script that mimics your actions.

  1. When you click on a button with a label of ‘Log-In’, only add the given command to your file:
    click| Login
  2. If you want to verify the following text appears in your page “my sample text”, add the following line:
    verifyText| my sample text
  3. Should you wish to employ a variable value, Add a $ to some variable name, like this:
    click| $mySite

This line will study a variable called ‘mySite’ from a variables file and select the contents of this selenium online tutorial variant. This is advantageous where you need to immediately change users or sites across selenium 2.0 online training online multiple scripts.

The variables file will need to be set in your parameters file, explained in the ‘Guidelines for Operating Evaluations’ area of selenium course tutorial online below.As soon as your script is finished, save it as an ordinary-text file. If your script(s) uploads any documents, place these files in a Selenium Training Tutorials common directory.

The framework requires a document exist that contains the complete path to Selenium Video Tutorials & your scripts along with the order of their execution. As an example, a test listing may exist that comprises these lines:

  • /storage/code/svn/edu/umich/keyword/csv/gradebook/01_Gradebook_Instructor_AddItem.csv
  • /storage/code/svn/edu/umich/keyword/csv/gradebook/02_Gradebook_Instructor_EditItem.csv
  • /storage/code/svn/edu/umich/keyword/csv/gradebook/03_Gradebook_Instructor_ImportGrades.csv
  • /storage/code/svn/edu/umich/keyword/csv/gradebook/04_Gradebook_Instructor_ChangeGradeOptions.csv
  • /storage/code/svn/edu/umich/keyword/csv/gradebook/05_Gradebook_Instructor_OverrideGrades.csv

Each of the scripts will be executed by the framework in the order it seems in the test list.

Instructions for Running Evaluations

The Keyword Framework is a standalone java program, written using Java 1.6. You’ll need to have an installed java jvm 1.6 or greater on your computer.
A parameters.txt file should be present in Selenium Training Video Tutorials exactly the same directory as the keywordFramework.jar file, containing the next information:

  1. os – This could either be ‘Windows’, or whatever else. This really is used internally by the framework to comprehend the orientation of forward and backward slashes “/” and “”. Basically the value of ‘Windows’ teachers the framework to transform forward-slashes to back-slashes. Any other term is blown off. Default is ‘mobile Me’.
  2. browser – Can be ‘firefox’, ‘internet explorer’, or ‘chrome’. Default is ‘*firefox’. NOTE: There is currently Selenium coaching Online Tutorials a bug in the Chrome driver that breaks file uploads. Selenium WebDriver Training Online knows of this and should be releasing a patch in early Fall 2011. Additionally, IE users would want to make sure their security choices are set according to webdriver interview questions the post.
  3. testList – The plain text file that indicates which tests you need to run along with the definite path to those scripts.
  4. variablesFile – The file which houses Webdriver Videos your variables. It might sit anywhere selenium course on the local machine. There is no default
  5. downloadDirectory – The listing that will store downloads briefly while they are verified. Note: This setting cannot alter the default download directory within the Chrome browser. Users who are examining Chrome should set this setting to your browser’s current download directory.
  6. logDirectory – The directory that will store your log files. All tests for a given run will probably be stored in a sub directory named after the time at which the tests began.
  7. fileDirectory – The listing which stores files which are employed as uploads by test scripts. This is all the directory for saving baseline variations of files that’ll be compared against down-load documents to verify the correct files are downloaded.

A sample parameters file for Linux users can be found here:

Once your scripts are written, as well as your parameters file is created, you’re ready to run your tests. Open a command line and browse to the directory which includes the keywordFramework.jar file and enter the following line:

java -jar keywordFramework.jar

The framework wants a couple of seconds to begin, but eventually a browser will launch along with your test scripts should begin to run. By default, the browser is closed at the end of every test script and re-launched before another one. Don’t be alarmed if you see browsers opening and closing often.

Instructions for Viewing Evaluation Results

All log files are stored in the directory indicated by your log Directory parameter. Different directories (named following the timestamp of your test run) include the logs of every test run. Within each sub-folder is a file called report.txt, which present which test cases passed and neglected, as well as summary stats for many cases.

Additionally there are individual log files for each test case. In case of failure, a screen capture is accumulated from your browser during the period of failure and saved in exactly the same sub directory as the log files. The screen shot is named following the unsuccessful test case.

Suggestions and Tricks

Windows customers trying to check downloaded pdf’s may see that the files open in your browser instead of downloading. Within Chrome, this behavior may be changed by opening content configurations and disabling plug-ins for pdfs. I had two that wanted disabling.

Download

  1. The Key Word Framework jar could be down load here. The parameters documents can be found here.
  2. The source-code is available here. Just the java files, and dependence, are utilized in constructing the jar.
  3. Some sample scripts are available here. These scripts are created to operate with the University of Michigan’s branded version of Sakai (CTools).
  4. hey’ll need to be modified to function in a Sakai QA environment.

Also find more here: http://www.seleniumhq.org/docs/03_webdriver.jsp

Leave a Reply

Your email address will not be published. Required fields are marked *