Results of Watir Test Automation for a .Net Project

This is part of a white paper i presented to my employer:

Advantages of Watir

By using Watir, the following has been achieved: -

  • Out of 14 smoke test cases, 10 have been automated.
  • Accuracy has been optimized since the human error is significantly reduced for multiple releases. With Watir, it's guaranteed that the exact same test case will be run on subsequent releases. This is a common benefit of test automation.
  • The time for running smoke test cases is reduced by approximately 70%. A transaction that would take 4 minutes manually took 1 minute using Watir.
    Table 1 shows the time measurements for smoke test cases taken for manual run and automated run:

Test Case #

Automatable (Y/N)

Average Manual Run Time(Seconds)

Average Automation Time (Seconds)

1

Y

59

16

2

Y

130

30

3

Y

140

36

4

N

250

-

5

N

230

-

6

Y

370

92

7

Y

240

34

8

N

255

-

9

N

245

-

10

Y

190

40

11

Y

205

60

12

Y

208

55

13

Y

190

45

14

Y

210

48

Table 1 Time Measurements for Manual vs. Automated Run

  • To avoid data dependency, test cases were made more interactive; by providing user input and database access blocks where necessary.
  • Cost of automation has been cut. An alternative to a proprietary automation tool has been found.
  • Disadvantages of Watir

    Some cons may hinde

  • Watir adoption: Watir requires knowledge in Ruby programming language.

  • WatirRecorder++ does not support some html elements like iframe.

  • Watir reporting capabilities are limited
  • Watir is still in the development phase to support other browsers like Mozilla Firefox.

    Conclusion:

    • We prototyped an automation test model for a .NET project. And the results were satisfying. Human errors are eliminated and testing time is significantly optimized.
    • Watir makes a convenient free alternative for test automation of .NET web applications. It has most of the features and capabilities available in other proprietary automation suites.
    • Using Watir, the time required for smoke and regression tests can be significantly reduced. This is very useful in agile projects where recurrent smoke tests are required for small builds.
    • Watir's scripting language is Ruby. A powerful programming language. This gives Watir scripts virtually unlimited capabilities.
    • Watir has some limitations when it comes to reporting and recognition of some html element.
    • Using open source/free alternatives in your organization can be of a great business value through time and cost reduction.

0 comments: