Share via


Recording Tests Using Windows Internet Explorer and Playing Back Using Mozilla Firefox

Using the Microsoft Visual Studio 2010 Feature Pack 2, you can use Windows Internet Explorer 7 (or later versions) to record UI actions on a website or a Web-based application and then play back the tests using the Mozilla Firefox browser versions 3.5 or 3.6.

Warning

After you have completed the installation of Microsoft Visual Studio 2010 Feature Pack 2, if you want to use the Test Package for Mozilla Firefox, you must install and configure the Test Helper Extension for Mozilla Firefox. For more information, see How to: Install the Test Helper Extension for Mozilla Firefox.

Tip

By default, the Test Helper Extension installer file (ConfigFFExtension.exe) is located in one of the following paths:

  • 32 bit machines: %CommonProgramFiles%\microsoft shared\VSTT\10.0\UITestExtensionPackages\ConfigFFExtension.exe.

  • 64 bit machines: %CommonProgramFiles(x86)%\microsoft shared\VSTT\10.0\UITestExtensionPackages\ConfigFFExtension.exe.

Warning

You can only use the Firefox browser to play back the coded UI tests. Recording coded UI tests on websites and Web-based applications by using the Firefox browser is not supported.

You can use the following test types to play back coded UI tests using the Firefox browser:

  • Coded UI Tests: You can create automated tests of the user interface (UI) known as coded UI tests. These tests provide functional testing of the user interface and validation of user interface controls. Coded UI tests let you test the functionality of a user interface. They are quicker to run than manual tests. Therefore, you can run them more frequently. Using the Microsoft Visual Studio 2010 Feature Pack 2, you can record UI actions on a website or on a Web-based application. You can create coded UI tests using Internet Explorer and then play back the tests using the Firefox browser.

    For more information about coded UI tests, see Testing the User Interface with Automated UI Tests.

  • Manual Tests: You can create manual test cases to test your application. In a manual test case, you can document all the required test steps for a specific scenario and any other information that you must have to run the manual test. This might include attaching files to the manual test case. You must add your manual test cases to a test plan to be able to run them using Test Runner. By adding your manual test cases to a plan you can save the results every time that you run your test. Using the Microsoft Visual Studio 2010 Feature Pack 2, you can create an action recording for manual test steps that are performed on a website or on a Web-based application. You can record the tests using Internet Explorer and then play back the tests using the Firefox browser.

    For more information about manual tests, see Creating Manual Test Cases and Running Manual Tests Using Test Runner.

Running Coded UI Tests Remotely

If you want to run your coded UI tests remotely for your application, you must install the Microsoft Visual Studio 2010 Feature Pack 2 on any computer that has a test agent or a test controller that you will use to run the tests. For more information about how to run coded UI tests, see How to: Set Up Your Test Agent to Run Tests that Interact with the Desktop and Running Automated Tests.

Building Coded UI Tests with Team Build

If you want to build the test project that contains your Silverlight coded UI tests as part of team build using a build agent, you must install the Microsoft Visual Studio 2010 Feature Pack 2 on any computer that has a build agent that is used to build the test project. For more information about how to build and run tests, see How to: Configure and Run Scheduled Tests After Building Your Application.

Multiple Mozilla Firefox Version Play Back Support

The user could have multiple versions of Firefox installed and multiple languages of the same version of Firefox installed. The playback lets the user choose the version and language of Firefox on which the playback is supposed to occur. While doing playback using the Microsoft Test Runner, all the Firefox versions that are installed on the machine are displayed for the user to choose from. In case of CodedUITest, the user can set the BrowserWindow.CurrentBrowser environment attribute to any of the installed versions and playback will choose the designated Firefox version for playback.

For example, if you set BrowserWindow.CurrentBrowser = “Firefox 3.5.7 (ar)” playback will use the 3.5.7 Arabic Version of Firefox. Setting the CurrentBrowser property to “Firefox” would choose the default version of Firefox installed for playback. Check the registry key under HKEY_LOCAL_MACHINE\SOFTWARE\Mozilla\Mozilla Firefox to find the names of all the Mozilla Firefox versions installed on your machine and use these names to set the CurrentBrowser property. You can also specify the CurrentBrowser property through CodedUITestCurrentBrowser Environment variable. Coded UI tests would read this environment variable and set the CurrentBrowser property itself as a part of test initialization. This is a better way to choose a browser for playback because it wouldn’t involve changing your coded UI test. Additionally, you can manipulate the browser for playback by using this environment variable.

Prerequisites

  • Visual Studio 2010 Ultimate, Visual Studio 2010 Premium or Test Professional 2010.

  • Mozilla Firefox versions 3.5 or 3.6 are installed and have been started at least one time for the current user.

Tasks

Key Tasks

Associated Topics

Caution noteCaution
After you have completed the installation of Microsoft Visual Studio 2010 Feature Pack 2, in order to use the Test Package for Mozilla Firefox, you must install and configure the Test Helper Extension for Mozilla Firefox. You must also install the Test Helper Extension as part of your Mozilla Firefox browser.

Play back manual tests using Mozilla Firefox: When you run a manual test, you can specify the test to use Mozilla Firefox browser for its interactions with a website or a Web-based application.

Play back coded UI tests using Mozilla Firefox: You can add an environment variable to your coded UI tests that will make the tests use the Firefox browser when it runs on test against websites or Web-based applications.

See Also

Concepts

Testing the Application

Testing the User Interface with Automated UI Tests

Creating Manual Test Cases

Running Manual Tests Using Test Runner

Other Resources

Testing the Application with Feature Pack 2