TestComplete for testing mobile web applications

Automation has evolved with time, Today the industry demands automation on mobile platforms as much as on the workstations.

After evaluating quite a few tools, I see that the easiest way to automate web applications for a mobile device is by using TestComplete: If you would want to do a POC yourself follow these simple steps and you will be ready to automate a lot more!
  • Uses Google Chrome’s mobile browser emulation. 
  • You can create automated GUI tests and functional tests of your mobile Web apps, and make sure they work fluently on multiple mobile devices with different aspect ratios and screen resolutions.
  • Chrome uses Webkit Browser Engine
  • Built-In Mobile Browser Definitions

  • Keyword Driven Mobile Web Mobile Web Testing

Let's get to the meat of things, How do you create your Mobile Web Tests?
  1. Create a New Project for POC
  2. Setup Chrome with the test case settings 
  3. To add a mobile browser profile to your test project:
    • Start test recording.
    • Select a mobile browser profile from the drop-down list on the Recording toolbar. TestComplete will launch the emulator with the selected profile.
    • Open your tested web site in the mobile browser emulator.
    • Perform test actions (navigate through web pages, fill out forms and so on) and create checkpoints for the tested web site.
    • Stop test recording.
  4. Run the test and modify if need be!
You have created your first mobile automated script!

Let's make these tests cross browser tests

In keyword tests, you can use the Virtual Browser Loop operation to repeat test operations in different mobile browsers.
  1. Insert the Virtual Browser Loop operation at the beginning of the test and configure its parameters:
    • Select whether to use all enabled mobile browser profiles or just specific ones.
    • Specify the URL of the tested web site.
  2. Delete the recorded Run Virtual Browser and browser.ToUrl operations at the beginning of the test. The Virtual Browser Loop operation replaces them.
  3. Place the test operations inside the loop (indented to the right of it).
  4. Before the end of the loop, add an operation that would close the browser emulator. For example, you can use the On-Screen Action operation to call the Close method of the Aliases.browser object.
During the test run, the Virtual Browser Loop operation launches the mobile browser emulator with each of the specified browser profiles in turn and executes the loop’s child operations against the tested web site in the emulator.

Comments

Popular posts from this blog

Software Testing @ Microsoft

Trim / Remove spaces in Xpath?