Showing posts with label language for test automation. Show all posts
Showing posts with label language for test automation. Show all posts

Which language seems to be the most predominant in Selenium script development?

60% of all Selenium downloads are for Java. 

This means that companies use mostly Java for Selenium test automation. 

Java is not only the most popular language for Selenium test automation. 


Source: http://blog.testproject.io/2015/12/03/worlds-most-desirable-automation-skills/

It is also more robust when used in enterprise projects. 

It has mature and powerful IDEs (Eclipse and IntelliJ) too. 

When selecting the language to learn for Selenium, keep this info in mind. 

Don't select the language based only on which is the easiest to learn. 

You may end up learning an easier language that is not really needed on your job market.

How to create classes and objects in Java

The focus of this blog is test automation for manual testers.

Test automation is not only about the Selenium WebDriver framework but also about a programming language (Java in our case) and unit testing (JUNIT).

Actually, the most important test automation skill is Java programming. 

This article is about how classes and objects are created in Java.

The code that follows is about working with triangles.

Any triangle has 3 sides.

For a triangle, one of the measures is the perimeter which is calculated by summing the values of the triangle sides.

The easiest way of calculating a triangle perimeter is

public class mainTriangle {
public static void main(String[] args) {

int x = 3, y = 4, z = 5;

int perimeter = x + y + z;

System.out.println("perimeter value = " + perimeter);

}
}

The code declares 3 numeric variables (using the int data type), one for each triangle side. It assigns a value to each side.

It then declares a numeric variable for the perimeter and it assigns to it the sum of the sides variables.

The last line displays the perimeter value to the console. If you run this code in Eclipse, the result is




Let's assume now that we want to do the same thing for one more triangle. The code changes just a bit:

public class mainTriangle 

public static void main(String[] args)

int x1 = 3, y1 = 4, z1 = 5;

int perimeter1 = x1 + y1 + z1;

System.out.println("perimeter1 value = " + perimeter1);;

int x2 = 6, y2 = 7, z2 = 8;

int perimeter2 = x2 + y2 + z2;

System.out.println("perimeter2 value = " + perimeter2);

}


The result of executing the code is:

perimeter1 value = 12
perimeter2 value = 18




The problems with this code are that

  • it is not clear that x1, y1, z1 (and x2, y2, z2) are the sides of a triangle
  • the code is repeated twice for calculating the perimeter for both triangles

To correct these deficiencies, we will create a class that describes a triangle.

A class is simply a container that defines the data and behaviors of a triangle:

public class Triangle{

int side1;
int side2;
int side3;

public Triangle(int x, int y, int z)

{
side1 = x;
side2 = y;
side3 = z;
}
}

What are all these things?

Lets take them one by one:

  • Triangle is the name of the class 
  • The class content is included between { }
  • side1, side2, side3 are called class members:
  1. The class members store information about the class. 
  2. In our case, the class members will store the triangle side values. 
  • public Triangle(int x, int y, int z) is called the class constructor:
  1. When an object for the class is created, the class constructor is executed first. 
  2. The class constructor can have parameters (x, y, z). 
  3. It stores the parameter values in the class members so that they can be used at a later time 
  4. The constructor provides the way of supplying information about specific triangle objects and storing it inside of the object.

Each class has objects that are concrete instances of the class.

An object is created as follows:


Triangle triangle1 = new Triangle(3, 4, 5);

Triangle triangle2 = new Triangle(7, 8, 9);



The code for creating the triangle1 object does the following:

  • the class contructor gets the following values for the x, y, z parameters: 3, 4, 5
  • the constructor stores the parameter values in the class members: side1, side2, side3
  • the values for class members for the triangle1 object are 3, 4, 5

So, our code becomes



public class mainTriangle { 


public static void main(String[] args) {

Triangle triangle1 = new Triangle(3, 4, 5);

Triangle triangle2 = new Triangle(7, 8, 9);

}



Executing the code will show no results.

We have added so far definitions of the data that any triangle has (members for the triangle sides).

We need to add now definitions for the behavior of the Triangle class.



Lets add a method to the class.

A method is a way of implementing a behavior that the class objects have.

The method will do something very simple.

It will get the value of one of the sides and return it.

public class Triangle{

int side1;
int side2;
int side3;

public Triangle(int x, int y, int z)

{
    side1 = x;
    side2 = y;
    side3 = z;
}

public int getSide1()
{
    return side1;
}

}


The method has the following components:

  • getSide1() is the method name
  • the code of the method is included in {}
  • the method returns a numeric value (int)
  • the method will get the value of the side1 class member and provide it (return side1;)
Similar methods can be implemented for the other 2 sides:


public class Triangle{

int side1;
int side2;
int side3;

public Triangle(int x, int y, int z)

{
    side1 = x;
    side2 = y;
    side3 = z;
}

public int getSide1()
{
    return side1;
}

public int getSide2()
{
    return side2;
}

public int getSide3()
{
    return side3;
}

}


We can add more code to our application:

public class mainTriangle {

public static void main(String[] args) {


Triangle triangle1 = new Triangle(3, 4, 5);
Triangle triangle2 = new Triangle(7, 8, 9);


System.out.println("side1 = " + triangle1.getSide1());
System.out.println("side2 = " + triangle1.getSide2());
System.out.println("side3 = " + triangle1.getSide3());

}


The result of executing the code is

side1 = 3
side2 = 4
side3 = 5

We can also calculate the perimeter of triangle1:

public class mainTriangle {

public static void main(String[] args) {


Triangle triangle1 = new Triangle(3, 4, 5);
Triangle triangle2 = new Triangle(7, 8, 9);



int perimeter = triangle1.getSide1() + triangle1.getSide2() + triangle1.getSide3();
System.out.println("perimeter = " + perimeter);


}


The result of executing the code is

side1 = 3
side2 = 4
side3 = 5
perimeter = 12




It is very nice and interesting that you can create classes and objects.

But how is this code better than the original one?

It seems that more code is needed when using classes and objects!

For the perimeter calculation, we can create a new method inside of the Triangle class:

public class Triangle{

int side1;
int side2;
int side3;

public Triangle(int x, int y, int z)

{
    side1 = x;
    side2 = y;
    side3 = z;
}

public int getSide1()
{
    return side1;
}

public int getSide2()
{
    return side2;
}

public int getSide3()
{
    return side3;
}

public int getPerimeter()
{
    return side1 + side2 + side3;
}

}

The getPerimeter() method works as follows:

- it gets the values of the side1, side2, side3 members
- it adds them up
- it returns the value of the sum

With the new method, the code gets simpler:

public class mainTriangle {

public static void main(String[] args) {

Triangle triangle1 = new Triangle(3, 4, 5);
Triangle triangle2 = new Triangle(7, 8, 9);

System.out.println("perimeter = " + triangle1.getPerimeter());

}


I did not use a variable to store the result of getPerimeter and then display its value.

Instead, I display directly the getPerimeter value.

If the perimeter of the second triangle is needed, just one more line is added:

public class mainTriangle {

public static void main(String[] args) {

Triangle triangle1 = new Triangle(3, 4, 5);
Triangle triangle2 = new Triangle(7, 8, 9);

System.out.println("perimeter1 = " + triangle1.getPerimeter());
System.out.println("perimeter2 = " + triangle2.getPerimeter()); 


}

}


I am hoping that the advantages of creating classes and objects start becoming obvious:

- it is clear in the final code that 3, 4, 5 are side values of a triangle

- the Triangle class defines how the triangle perimeter is calculated; this is done only once and then used by any of the objects of the class; imagine that the we need not one line of code for calculating the perimeter but 5 lines

- there is no code duplication any longer

I hope that this short example showed that programming can be learned and it is not as difficult as you may think.


How about some exercises using your new knowledge? :)

1. Create a rectangle class with methods for calculating the rectangle perimeter and area

2. Add a method to the Triangle class that checks if the triangle is scalene (all sides are different), isosceles (2 sides are equal) or equilateral (all sides are equal)?


If you liked this article and want to provide feedback or want to submit your solutions to the exercises, please use the comments section.

Is Test Automation For Testers?

Who does test automation?

Is test automation for testers or for developers?



Who writes the test automation code?

Do testers have to write code?


A few years ago, my answer was that testers do the test automation.

My impression at that time was that testers can learn programming and a test automation framework and improve their development skills from there.

Test automation was getting more and more prominence as Selenium and other tools were created in addition to QTP.

Today, I am not so sure.

I attended this afternoon the VAN Q testing meetup organized monthly in Vancouver, BC.

The meetup topic was test automation of mobile apps and games.

There were 2 parts to the meetup.

The first was about Test Droid cloud service and how it allows running automated tests for mobile apps and games on hundreds of real devices.



This exposure was more about how Test Droid works and less on test automation.

If you have not heard of Test Droid before, it is similar to how Sauce Labs works for web and mobile test automation.

It uses different automation frameworks like Appium, UI Automator, Selendroid, Robotium and lots of real devices.

The second part covered how test automation is done at Electronic Arts.

Electronic Arts is using 2 different approaches to test automation:
  1. based on image comparison
  2. based on the application instrumentation 
Even if both approaches are still used in projects, the instrumentation approach becomes the preferred way.

For the test automation based on application instrumentation, Electronic Arts has built its own test automation framework called Unity. 

With the help of the framework, the testers can create test automation scripts using Java and C#. 

Before creating a test automation framework, EA tried many approaches and tools.

All of them worked to a certain degree only. 

So, the test automation process for EA includes
  1. using their own test automation framework
  2. creating test automation scripts with Java and C#
  3. integrating the test automation scripts with the build process using Jenkins

Very good meetup with lots of interesting details. 

So many technologies mentioned in one afternoon: 
  • programming languages: C#, Java
  • multi device cloud services: TestDroid
  • test automation frameworks: UI Automator, Appium, Selendroid, custom frameworks
  • Jenkins

But I wonder how many testers from the audience have any experience with them. 

My impression is that not many. 

So, going back to the initial question, is test automation for testers? 

Or test automation is for developers? 

Some people say that test automation is for software developers in test. 

This is a confusing name which essentially means just software developer. 



To make the answer to the main question more difficult, see below some questions from an interview I had a while ago for a test automation position: 

  • what is new in Java 8?
  • what is a stack?
  • what is a queue?
  • considering an array of numbers that can have the same number twice, how do you find the duplicated numbers?
  • what is a hash table?
  • can a static method be overloaded? 

 How many manual testers can answer these questions? 

Also, there seems to exist a trend where big companies have less and less testers or no testers at all. 

They rely on developers to do the development and testing. 

Because it is obviously easier for developers to learn testing than for testers to learn development.



Based on all this information, I think that unless testers start thinking seriously about learning programming and learning test automation frameworks, they should leave the test automation to developers.



It is not easy to go from manual testing to test automation but not impossible either. 

The issue with this is that the distance between manual testers and developers becomes wider and wider every year.

So what are you waiting for?


Make the first step and learn a programming language.



Add another step and learn the test automation framework. 

Add another step and another and another ...

Test automation is waiting for you ....

How much Java do I need to learn for mastering Selenium?

I see these questions from time to time on testing forums:

"How much Java do I need to learn for mastering Selenium?"
"How much programming do I need to learn for test automation?"

My initial response is "as much Java as you can learn".

What I mean is that since the programming language is the most important skill for test automation, everyone should learn it as much as possible.

While I still like my response, it is not helpful for other testers that want to learn a programming language for test automation.


First, I want to say something about the question.

It implies that mastering Selenium happens after learning some Java programming.



A similar question could be:

I don't know how to swim but how much swimming do I need to learn to compete for Olympics?

To go from no swimming skills to just decent swimming is very difficult.

Going from decent swimming to mastery of swimming is just not realistic for most of people.

I picked swimming as a skill example as the process of learning test automation is similar to learning any other skill.


Mastering a skill usually means that you are at the highest level possible for it.

This does not happen obviously through just learning as a lot of practice and self-improvement are needed.

And time, perseverance and patience.


Going from a manual tester to a test automation engineer that masters Selenium is a very difficult goal.


Test automation engineers that master Selenium are usually software developers in test.


Meaning professional developers.


Still, how much Java do you need to master Selenium?

What concepts of Java do you need to learn to use Selenium?

Between manual tester with no programming skills and test automation engineer that masters Selenium, there are a few different levels.






1. Learn Java basics for Selenium test automation scripts

Java basic knowledge is sufficient for creating simple Selenium test automation scripts.

You will need to learn about
  • variables
  • fundamental data types (String, Integer, Boolean) and their operators
  • conditional operators
  • string methods
  • conditional statements (if/else, switch)
  • looping statements (for, while)
  • arrays
  • packages
  • exceptions
  • lists
  • read and write files
  • use Java API


After learning the basic concepts, you should be able to create basic test automation scripts with Selenium.

These scripts will include WebDriver API which is ok while learning Selenium.

But as soon as you start having more and more scripts, the scripts maintenance will become an issue.



2. Create maintainable scripts with page object model


Having a large number of test automation scripts that include WebDriver APIs poses an issue from the maintenance point of view.

Since each script is independent and some scripts may just repeat the same lines of code, changing the test scripts for improvements or because of bugs is difficult to do.

The more complex test scripts are, the harder to maintain.

And we should remember that the biggest failure point in test automation efforts is test automation scripts complexity.


So we need to reduce the test scripts complexity and make scripts maintenance easier.

For these purposes, you need to start learning the Java object oriented programming concepts.

This includes learning about

  • creating classes and objects
  • class fields
  • methods and constructors
  • method overloading
  • set/get methods
  • class/field/method modifiers


The object oriented programming concepts will help implementing the page object model for your test automation scripts.

This means that you will create classes that correspond to site's pages (or components of site pages) and move the WebDriver API code from the test scripts to the page object model classes.

By doing this, you keep your test scripts free of any direct interaction with the site.

The interaction with the site is being done in the page object classes.


3. Create an automated testing framework with Selenium





After having page object classes, you will want to start creating your test automation framework.


The framework should be useful not only for one site but any number of sites.


And possibly for mobile applications as well.




You need to learn the Java advanced concepts like

  • class inheritance
  • base classes
  • method overriding
  • polymorphism
  • interfaces
  • static classes
  • inner classes
  • abstract classes


4. Improve the test automation framework design



You need to learn code refactoring and design patterns for this purpose.

Code refactoring will help making your test automation framework simpler and more efficient.

Design patterns will provide proven ways of solving common development problems.






Are there more levels?


Yes. Learning a skill never ends. 


There is a long way from manual testing to test automation with Selenium.

But taking it a step at a time will eventually get you there.

With perseverance and lots of patience.

What Programming Language To Learn For Test Automation



A fellow tester asked me recently what programming language would be best to start out learning for test automation.

She tried learning C++ awhile back without success.


She was also asking if , for a tester, knowing a programming language is a "must learn" to succeed and grow in testing.


In other words, do testers have to write code?

I agree that learning a programming language is intimidating and difficult for manual testers.

But it should not be so.




What is the best programming language for test automation?


My suggestion is Java or C#.

Let's take Java for example since C# is very similar to Java.


People say that Python and Ruby are easier to learn for a novice and they are probably right.


I don't know Python and used Ruby for just a month to see how it is (very interesting).



I suggest Java because


- Java is available for a long time compared with Ruby and Python which are rather new



- Java is very popular; it is the language with the highest popularity increase (5.94%) in 2015







- a lot of documentation is available on the internet for Java, many online Java courses and many Java books


- learning the first language is difficult regardless of the chosen language; some people recommend learning first Python and Ruby and then learning Java; but if you will put the effort and time into learning, why not learn Java from the start?


- learning Java may be more difficult than Python and Ruby, especially the object oriented part of it; but as soon as you learn it, Java can be applied to many testing types like test automation with Selenium for web and mobile apps, API testing, performance testing (with JMETER)



- while learning the new language, you will have a lot of questions and may get stuck; if your learning is through a Java course, you can ask your instructor for answers; otherwise, it is important to know people that have experience with the language that you are learning; most of developers know Java or C#; Ruby and Python developers are rather rare; I still haven't met a developer on the local market (Vancouver, Canada) that uses these languages for work projects; most of developers use either Java or C#



- Java has a very good IDE (Eclipse)



- if you are planning on using Java for test automation, 65% from all Selenium downloads are for Java







Is learning a programming language a "must-do" for a tester?


More and more companies are moving away from hiring pure manual testers and prefer testers with test automation skills.

Learning a programming language has additional benefits to get you started with test automation.


A tester that knows a programming language will speak the same "language" as developers.


He will understand better what developers do and get a better appreciation of how complicated development is.


He can do unit testing and participate in code reviews.




Top 3 skills needed for test automation

You are a manual tester and think about starting to learn test automation. 

And you heard that, in automation projects,  test automation skills are being used such as 

- XPATH and CSS for creating web element locators 

- JUNIT for the automated test scripts 

- a programming language 

- a test automation framework (Selenium WebDriver for example) 

- page object model 

But which are the most important test automation skills?



Here they are: 

1. programming language 

2. programming language 

3. programming language 


Why is the programming language so important? 




Because record and play test automation does not work, despite what the test automation vendors say. 







Test automation means writing code that uses the test automation framework for interacting with an application. 



Based on this definition, you may say that learning a test automation framework is for sure one of the top 3 skills as well. 

Wrong! 

Let's take Java as an example of a programming language. 

Learning Java means that you will learn about 

- data types 

- variables 


- operators 


- simple statements (if/else, switch, for, while) 


- arrays 


- classes 


- objects 


- OOP concepts (inheritance, polymorphism)


- etc.



It also means learning how to use the classes included in the JAVA framework such as 

- List class

- File class

- Reader class

- Writer class

- Connection class

- ResultSet class

- XMLStreamReader class

- XMLStreamWriter class

- etc.




Once you understand how to use the JAVA framework, learning the Selenium WebDriver framework is straightforward because this is just another framework. 


So, learn a programming language and learn it well if you want to go far with your test automation projects. 

Which programming language you choose matters less. 

I suggest learning Java for Selenium test automation as most of the documentation/blogs/books use it. 

But you can learn as well Ruby or C#.

Use simple and easy to understand regular expressions in your code

I used regular expressions a few times in my test automation code and each time they were not easy to understand by other people.

It is possible to make them readable as explained in Martin Fowler's article on REGEX.

For this text (score 400 for 2 nights at Minas Tirith Airport), instead of using 

const string pattern = 
  @"^score\s+(\d+)\s+for\s+(\d+)\s+nights?\s+at\s+(.*)";

use 

private String composePattern(params String[] arg) {
      return "^" + String.Join(@"\s+", arg);
    }
  
and 
const string numberOfPoints = @"(\d+)";
const string numberOfNights = @"(\d+)";
const string hotelName          = @"(.*)";

const string pattern =  composePattern("score", numberOfPoints, 
      "for", numberOfNights, "nights?", "at", hotelName);

Instead of having a long and complicated expression, have a few simple, short expressions that are joined together into a long regular expression.

Scripting languages comparison

Related article:
Thoughts on test automation (Brett Pettichord)

Last week, I went through a lot of printed articles waiting to be read and among them were a few from Brett Pettichord on test automation.

If you don't know who he is, he wrote LESSONS LEARNED IN SOFTWARE TESTING with James Bach and Cem Kaner and is one of the experts in test automation.

The HOMEBREW TEST AUTOMATION article (available on www.pettichord.com) has interesting comparisons between scripting languages as follows:




Ruby, Python and Perl are all supported by SELENIUM.

The article is rather old (2004) but the comparison is still useful especially for testers that consider learning their first scripting language.

This convinced me of learning Ruby so will give it a try in the next months.

So far, the only language I used for test automation is VB Script with QTP.

But I am open to better language alternatives, especially since QTP is so expensive and Selenium is free :)

Alex







Brett Pettichord - thoughts on test automation

The following were selected from various articles of Brett Pettichord from 2002 and 2004. 
                                                               
- Focus the automation strategy on key features or concerns that can benefit from the added power of automated testing

- Find a way to leverage the staff skills available for testing

- Test automation is a software development process:

    1. establish milestones and deliverables
    2. define requirements
    3. manage source code, test data, tools
    4. design before coding
    5. review the code
    6. test the code
    7. track automation bugs
    8. document for other users

- Test automation is a significant investment:

    1. staff time commitment can dwarf tool cost
    2. prepare for 10 times manual effort
    3. maintenance effort can be large

- Automated regression tests find a minority of the bugs and most of them are found when the tests are created

- Can you automate at times when you can't otherwise test?

- Capture-replay fails; tests are too sensitive for user interface changes

- Test tools are buggy

- The problem with bad automation is that no one may notice:

    1. tests may not do what you thought
    2. tests may no longer be interesting
    3. coverage may be poor
    4. false alarms may be common
    5. test results may be false

- Test automation projects require skills in
    1. testing
    2. development
    3. project management

- Don't mandate 100 percent automation

- Use pilot projects to prove feasibility

- Use abstraction techniques for the user interface changes:

    1. window maps
    2. data driven tests
    3. task libraries
    4. keyword driven tests
    5. api driven tests

- Avoid complex logic in your tests

    1. keep tests linear: easy to understand, hard to make mistakes
    2. encapsulate necessary complexity

- Don't build libraries simply to avoid repeating code; hodge-podge libraries make tests hard to understand and maintain; design your libraries, don't just whip them together on the fly

- Use standard scripting languages, avoid proprietary languages

- Have testers and programmers jointly charter automation projects

- Speed the development process instead of trying to save a few dollars on testing

- Test automation tool components:

    1. languages

        * tie other components together
        * describe tests
        * provide dedicated libraries

    2. interface drivers

        *interact with the product software under test

    3. test harnesses

        * collect and execute multiple tests
        * report test results

    4. remote agents

        * provide test related services on remote machines

    5. test parsers

        * interpret and execute tests expressed in convenient form

    6. test generators

        * create new tests based on models and algorithms

- Scripting languages for testing

    PERL
        1. well established
        2. vast libraries

    TCL

        1. well established
        2. compact
        3. popular with embedded systems

    PYTHON

        1. concise support for object oriented programming
        2. integrates well with java

    RUBY - best

        1. everything's an object
        2. principle of least surprise

    VB & VBSCRIPT

        1. popular
        2. integrate well with Microsoft technologies
        3. not open source

    TCL, PYTHON and RUBY have line interpreters.

    Another up and coming scripting language is GROOVY. Like Jython, it runs inside the JVM.

    PERL has the most libraries of any of the languages listed here. For many people, this is a good reason to use PERL.

    The lack of a line interpreter for PERL is to me its greatest weakness.

    The lack of native support for general templating is PYTHON's greatest weakness.

- Understand the motivations of the test tool vendors

    1. want you to think they are experts in testing: guess what? they are not
    2. encourage belief in tool magic
    3. achieve lock-in when your test library is in their language
    4. focus on improvements that people will see during the eval period: enhancements for power users go on the back burner

- Test automation architectural patterns
       
        1. scripting frameworks
        2. data driven scripts
        3. screen based tables
        4. action keywords
        5. test first programming
        6. api tests
        7. thin gui
        8. consult an oracle
        9. automated monkey
        10. assertions and diagnostics
        11. quick and dirty

- Test automation common problems

        1. spare time test automation
        2. lack of clear goals
        3. lack of experience
        4. testing the wrong stuff
        5. high turnover
        6. reaction to desperation
        7. reluctance to think about testing
        8. technology focus
        9. working in isolation

- Rules of software development

        1. define requirements
        2. manage source code, test data, tools
        3. design before coding
        4. review test automation code
        5. test the code
        6. track automation bugs
        7. document for other users
        8. establish milestones and deliverables

- SEVEN STEPS TO TEST AUTOMATION SUCCESS

        1. follow the rules of software development
        2. improve the testing process
        3. define requirements
        4. prove the concept
        5. champion product testability
        6. design for sustainability
        7. plan for deployment

- 2 focuses for test automation

        EFFICIENCY

            - reduce testing costs
            - reduce time spent in testing phase
            - improve test coverage
            - make testers look good
            - reduce impact on the bottom line

        SERVICE

            - tighten build cycles
            - enable refactoring and other risky practices
            - prevent de-stabilization
            - make developers look good
            - increase management confidence in the product

        Automation projects with a service focus are more successful.


- User interface change: your gui test automation will likely break. what can you do?

        1. prevent developers from changing them
        2. design your automation so it is adaptable
        3. test via non-user interfaces

- Quality attributes for test automation

        1. maintainability
        2. reviewability
        3. repeatability
        4. integrity
        5. reliability
        6. reusability
        7. independence
        8. performance
        9. simplicity

- Top 10 reasons for automating tests

    1. manual testing sucks
    2. tool vendor said that capture replay works
    3. afterwards, we can fire all those pesky testers
    4. everybody else is doing it
    5. big bucks already spent on the test tool
    6. looks good on the resume
    7. keep the intern busy

- Gradual test automation: test automation benefits from a gradual approach; build some tests and se how they run before adding complexity

- Use a pilot project:

    1. validate your tools and approach
    2. demonstrate that your investment in automation is well spent
    3. quickly automate some real tests
    4. get a trial license for any test tools
    5. scale your automation project in steps

- Reasons for automating

    1. speed up testing
    2. allow more frequent testing
    3. reduce manual labor costs
    4. improve test coverage
    5. ensure consistency
    6. simplify testing
    7. just want testing to go away
    8. define the testing process
    9. make testing more interesting and challenging
    10. develop programming skills
    11. justify cost of the tools

    REASONABLE REASONS
    - high reuse
    - speed development
    - expand reach
    - smooth development

    UNREASONABLE REASONS
    - simplify testing
    - force organization
    - 100% automation
    - justify tool purchase

    MIXED BAG
    - regression testing
    - build skill and morale

- What are your success criteria

        1. the automation runs
        2. the automation does real testing
        3. the automation finds defects
        4. the automation saves time

- ARE YOU READY TO AUTOMATE?

    1. is automation or testing a label for other problems?
    2. are testers trying to use automation to prove their prowess?
    3. can testability features be added to the product code?
    4. do testers and developers work cooperatively and with mutual respect?
    5. is automation developed on an iterative basis?
    6. have you defined the requirements and success criteria for automation?
    7. are you open to different concepts of what test automation can mean?
    8. is test automation lead by someone with an understanding of both programming and testing?

- WHAT HAVE WE LEARNED ABOUT TEST AUTOMATION

    1. keep it simple
            - test automation tends to complicate things
            - the test suite itself will need to be tested
            - make sure the test suite meets the original goals

    2. build flexibly and incrementally
            - build and deliver test automation in stages
            - deliver a proof of concept early
            - deliver automation updates regularly
            - package the automation so that it can be installed easily
            - document all dependancies

    3. work with development
            - test automation is development; get help from your development experts (developers)
            - incorporate automation milestones into the development plan

    4. keep tests visible
            - visibility facilitates review
            - review encourages realism about test coverage
            - test suites require review and improvement
            - dont assume that old features are covered by existing tests
            - assess test suite weaknesses and product risks
            - are these tests still useful?

    5. use multiple approaches
            - it is better to use several approaches half-way than to use one perfectly
            - test expertise and manual testing are still required
            - manual testing is a sanity test for the automation
            - there will always be need for exploratory, non-repeated testing

    6. get an early start
            - an early start makes it more likely you can improve testability and get test APIs
            - your tes strategy will include automation from the start

    7. commitment is essential
            - it is easy for test automation to be designed as a side project. it wont get the resources it needs
            - commitment ensures that test automation gets the resources, cooperation and attention that it needs
                    * from management
                    * from development