Posts Tagged ‘QA’
06
Apr
This entry is part 2 of 2 in the series FitNesse - UAT

Introduction

As explained earlier, FitNesse is a wiki server; it helps us to organize all our test scripts in the form or Wiki pages. It is a web server, it enables multiple people to work on automation scripts by keeping them at a central location. Even when fixture is doing all the work, at some point of time when the fixture has to be invoked, FitNesse wiki is the calling application. It supplies the fixture right automation scripts at right time as and when the tester wants to do the testing. FitNesse receives the statistics about the test status (pass or fail) and creates a report in wiki page itself which is easy to debug. For creating the wiki pages we should follow the following steps:

Downloading and Installing FitNesse

It really takes very little time and effort to get FitNesse running on your machine.

Go to http://fitnesse.org/FrontPage.FitNesseDevelopment.DownLoad and click on the most recent fitnesse.jar file. Download the fitnesse.jar to some location in local machine.

Type java -jar fitnesse.jar

  • It will perform the installation /updates
  • When it’s done, it will ask you to reload fitnesse. Type java -jar fitnesse.jar –p 8080.
  • If you have nothing running on port 8080 on your machine, you should see a message similar to the following:
  • Fitnesse (date code) Started…
    • Port: 8080
    • root page: fitnesse.wiki.FileSystemPage at ./FitNesseRoot
    • logger: none
    • authenticator: fitnesse.html.HtmlPageFactory
  • If you don’t see this, you may have something running on port 8080 already,
    • So try the command java -jar fitnesse.jar -p 8090
    • If you are still having trouble then check out FitNesseWontStart.

Start up a browser and go to http://localhost:8080

The main FitNesse screen should come up. That’s it. You’re ready to start using FitNesse.

Process for creating/editing new wiki page:

  • Go to the home page http://localhost:8080
  • Click on edit link on LHS side
  • Enter the CamelCase text as a name of the page link e.g. QueryTest, NewTestPage

(The names: newTestpage, newTestPage are invalid and the names: NewTestPage, NewtestPage, SampleTestPage, SampleTestpage, SampleExample are valid)

  • Click on save button
  • Check the frontpage displayed with the text QueryTest? With a link on “?”
  • Click the link on “?”
  • New page displayed with URL http://localhost:8080/QueryTest?edit&nonExistent=true

OR

  • For creating or editing new wiki page directly through URL:
    • current-url.NewPageName
    • current-url.NewPageName?edit
  • click on save and again go to this new page and click on ‘Properties’ link on LHS panel
  • This displays the page for setting up the page properties for the page
    • Select Test from Page type, check all check boxes from Actions and keep others default
    • Click on ‘Save properties’ button at the bottom
    • Check the new page with the buttons like Test, Edit and so on… at the LHS panel

For more detailed commands related to creating and editing the new wiki pages check out the page: http://fitnesse.org/FitNesse.UserGuide.QuickReferenceGuide

, , , , ,

09
Feb

Selenium is a suite of tools used to automate web application testing across many platforms. It is an open source tool developed in Java Script and browser technologies and hence supports all the major browsers on all the platforms. It was developed by ThoughtWorks Inc.

There are 4 components of Selenium:

1) Selenium Core:

This is the original JavaScript-based testing system. It is now used primarily as a component of Selenium Remote Control, but it can also be used as a pure JavaScript/HTML testing system. To run Selenium Core tests, they normally have to be installed on the server on which you want to test.

2) Selenium IDE:

Selenium IDE is an integrated development environment for Selenium tests. It is implemented as a Firefox (2+) extension, and allows you to record, edit, and debug tests.

Features:

  • Easy record and playback
  • Intelligent field selection using IDs, names, or Xpath, as needed
  • Autocomplete for all common Selenium commands
  • Walk through tests
  • Debug and set breakpoints
  • Save tests as HTML, Ruby scripts, or any other format
  • Support for Selenium user-extensions.js file
  • Option to automatically assert the title of every page

Drawbacks:

  • The biggest drawback of Selenium IDE is its limitation in terms of browser support. Though Selenium scripts can be used for most of the browsers and operating systems, scripts written using Selenium IDE can be used for only the Firefox browser if it is not used with Selenium RC or Selenium Core.
  • Selenese, the simple scripting language used by IDE, is somewhat primitive as it has no conditionals (no “if” statements), and no loops (no “for” statements).
  • Does not help with the launching and closing of the browser

Note: Selenium IDE can be configured to repeat a specific test by using flowControl extensions: goto, While, and so on, by installing the selenium-goto extension (download it from http://wiki.openqa.org/pages/viewpageattachments.action?pageId=379). To install it, open the Options panel in the Selenium IDE browser extension and specify the location of the user-extension.js file.


3) Selenium Remote Control:

Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser. The RC server also bundles Selenium Core, and automatically loads it into the browser.

Selenium RC comes in two parts:

a) A server, which automatically launches and kills browsers, and acts as a HTTP proxy for web requests from them.

b) Client libraries for your favorite computer language (Java, .NET, Perl, Python, C#, PHP and Ruby).

Click on selenium for a simplified architectural representation.

As a test suite starts, the following happens

  • The client/driver reaches out to the Selenium-Server.
  • The Selenium-Server launches a browser (or reuses an old one) with a URL that will load the Selenium core web page.
  • The Selenium-Core gets the first instruction from the client/driver (via the HTTP Proxy built into the Selenium RC Server).
  • The Selenium-Core acts on that first instruction, typically opening a page of the AUT.
  • The web server is asked for that page, and it renders it in the frame/window reserved for it.

4) Selenium Grid:

Selenium Grid runs tests on many servers at the same time, cutting down on the time it takes to test multiple browsers or operating systems.

Installation:

  1. Selenium IDE:
    • Selenium IDE can be downloaded from http://seleniumhq.org/download/.
    • Open Mozilla Firefox.
    • Drag and drop the file into it.
    • Install it and restart Firefox
    • If installed properly, Selenium can be accessed from Tool –> Selenium IDE in your browser toolbar.
  2. Selenium RC:
    • Selenium RC can be downloaded from http://seleniumhq.org/download/.
    • Unzip the file and extract it in the directory of your choice.
    • JRE 1.5 or higher version should be installed on your machine. To check the version, type the following command at the dos prompt: java -version.

Bibliography:

http://seleniumhq.org/

http://www.testinggeek.com

By Diana Dsouza

, , ,