Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
SlideShare a Scribd company logo

1

The power of automated testing
GLOBANT
We are

2

Is the process of operating a system or
component to evaluate specific aspects
under specific conditions, observing and
registering the results.
The process of executing a program
with the intention of certifying its
quality.
TESTING PROCESS
Testing is the art of destroying
something constructively

3

Why is it
necessary?
Because errors exist...and humans **** up things. Testing
helps us to:
Ensures product fits customer's requirements
Makes sure the code is reliable, helps improve developers
knowledge/skills and overall product quality
Reduce defects that can potentially reach Production
environments
Redefine the way things are done and how they work
Set projects up to success
As time passes, the cost of fixing a defect increases.

4

Approach Purpose Pros Cons
Black Box Tests what the software should do
Based on the module’s definitions and
specifications
Does not care about the program’s internals
Functional test, produced by data, inputs and
outputs
Unbiased
User based testing
Requirement
validation approach
Testing each/every input is unrealistic.
Insufficient time. Many paths go
untested
Hard to evaluate how much has been
tested
Suites grow fast. High maintenance of
automated tests
Test redundancy
White
Box
Tests what the software does
Test cases are designed considering the
software’s internal structure
Harder to validate requirements
Development skills needed
Cannot detect absence of functionality
or misinterpretations
Positive Verifies the ability of the system to implement a solution to the business needs under normal conditions
Negative Verifies the ability of the system to detect, document and resolve user errors or any other condition not
considered normal
Testing approaches

5

Generally described within the functional requirements
specification
Refers mostly to “what the system does”
These tests belong to the “Black Box” category
Smoke testing: Refers to the first tests that are executed to provide quick feedback to determine if system
under test is stable and won’t fail drastically
Sanity testing: Refers to the suite of tests that is executed to verify the main functions of a system are
working without errors to determine if it is reasonable to continue with further (more detailed) tests
Regression testing: Consist in testing a system after a modification has taken place to verify that no new
defects have been introduced or affected the previous correct functionality
FUNCTIONAL TESTING TYPES

6

May include:
Performance
Stress
Usability
Disaster/Error Recovery
Portability
NON FUNCTIONAL TESTING TYPES

7

Automation Engineering aims to improve productivity and quality of repetitive tasks that are normally
tackled by people.
Increased throughput or productivity.
Improved quality or increased predictability of quality.
Improved robustness (consistency), of processes or product
WHY DO WE AUTOMATE?

8

Faster time to market
Reduced cost of failure
Leverage
Cumulative coverage
BENEFITS

9

When is automating a
good idea?
Application stable
Tests that use multiple data values for the same cases
Tests that require detailed information about the internal state of the system (SQL, GUI, etc)
Tests run in several environments)

10

When is automating not a good idea?
Not final version of the app or systems in beta phase
Tests that will be run only once
Tests with little predictable results
Unstable applications

11

MANUAL
Manual testing vs Automated
testing
Success of the expertise of the performer
Difficult to document
Difficult to keep updated
Automated
The result does not depend on the performer
Self-documented
Auto-updatable if there are changes in the application

12

Record and playback
Data driven
Keyword driven
BDD and Hybrid
Selenium based frameworks. Do you want reinvent the wheel?
Generations of test
automation frameworks

13

Most popular Selenium IDE
No code needed
Hard to maintain
Record and playback

14

Data Driven Testing Framework helps the user segregate the test script logic and the test data from each
other
External data from databases, csv, text files
Data driven

15

Common functions to perform actions
keywords are stored in a step-by-step fashion with an associated object.
Object mapping
More in-depth programming knowledge
Keyword driven

16

Some of the top recognised automation QA engineers decided to crate frameworks “core” and share it with
the rest of the world
Much better to base your hybrid framework on them then reinventing the wheel.
Barely support
@Test
public void userCanLoginByUsername() {
open("/login");
$(By.name("user.name")).setValue("johny");
$("#submit").click();
$(".loading_progress").should(disappear); // Waits until element disappears
$("#username").shouldHave(text("Hello, Johny!")); // Waits until element gets text
}
Selenium based frameworks

17

Behavior Driven Development frameworks allow automation of functional validations in easily readable and
understandable format to Business Analysts, Developers, Testers, etc.
Combination of one or more than one above mentioned.
Users don’t necessarily need to be acquainted with programming.
Adapted to get the best results
Hybrid, the most popular approach nowadays
BDD and Hybrids frameworks

18

Automation framework

19

Group of libraries that define coding standard , concepts, processes to support automated testing. So we
can follow these guidelines while automating application to take advantages of various productive results.
Reuse, coding faster...
What is an Automation
framework

20

How does an automation
framework works?

21

Object mapping
Steps
Test cases
Schedule
How does an
automation framework
works?

22

Tools Commercial
Open Source

23

The page object is a design pattern for enhancing test maintenance and reducing code duplication
Page Object Model
Clean separation between test code and page specific code such as locators and layout.
Providing higher-level operations than the exposure of elements: for example, filling a form with a single
method that contains default values for most of the inputs.
It improves the readability and allows us to create interactive documentation
POM creates our testing code maintainable, reusable.

24

The PageFactory Class in Selenium is an extension to the Page Object design pattern. It is used to initialize
the elements of the Page Object or instantiate the Page Objects itself
Page Factory
we use annotations @FindBy to find WebElement.
We use initElements method to initialize web elements

25

Schedule

26

Q&A

27

WE HELP
YOU
STAY
RELEVANT

More Related Content

Lightning Talks by Globant - Automation (This app runs by itself )

  • 1. The power of automated testing GLOBANT We are
  • 2. Is the process of operating a system or component to evaluate specific aspects under specific conditions, observing and registering the results. The process of executing a program with the intention of certifying its quality. TESTING PROCESS Testing is the art of destroying something constructively
  • 3. Why is it necessary? Because errors exist...and humans **** up things. Testing helps us to: Ensures product fits customer's requirements Makes sure the code is reliable, helps improve developers knowledge/skills and overall product quality Reduce defects that can potentially reach Production environments Redefine the way things are done and how they work Set projects up to success As time passes, the cost of fixing a defect increases.
  • 4. Approach Purpose Pros Cons Black Box Tests what the software should do Based on the module’s definitions and specifications Does not care about the program’s internals Functional test, produced by data, inputs and outputs Unbiased User based testing Requirement validation approach Testing each/every input is unrealistic. Insufficient time. Many paths go untested Hard to evaluate how much has been tested Suites grow fast. High maintenance of automated tests Test redundancy White Box Tests what the software does Test cases are designed considering the software’s internal structure Harder to validate requirements Development skills needed Cannot detect absence of functionality or misinterpretations Positive Verifies the ability of the system to implement a solution to the business needs under normal conditions Negative Verifies the ability of the system to detect, document and resolve user errors or any other condition not considered normal Testing approaches
  • 5. Generally described within the functional requirements specification Refers mostly to “what the system does” These tests belong to the “Black Box” category Smoke testing: Refers to the first tests that are executed to provide quick feedback to determine if system under test is stable and won’t fail drastically Sanity testing: Refers to the suite of tests that is executed to verify the main functions of a system are working without errors to determine if it is reasonable to continue with further (more detailed) tests Regression testing: Consist in testing a system after a modification has taken place to verify that no new defects have been introduced or affected the previous correct functionality FUNCTIONAL TESTING TYPES
  • 7. Automation Engineering aims to improve productivity and quality of repetitive tasks that are normally tackled by people. Increased throughput or productivity. Improved quality or increased predictability of quality. Improved robustness (consistency), of processes or product WHY DO WE AUTOMATE?
  • 8. Faster time to market Reduced cost of failure Leverage Cumulative coverage BENEFITS
  • 9. When is automating a good idea? Application stable Tests that use multiple data values for the same cases Tests that require detailed information about the internal state of the system (SQL, GUI, etc) Tests run in several environments)
  • 10. When is automating not a good idea? Not final version of the app or systems in beta phase Tests that will be run only once Tests with little predictable results Unstable applications
  • 11. MANUAL Manual testing vs Automated testing Success of the expertise of the performer Difficult to document Difficult to keep updated Automated The result does not depend on the performer Self-documented Auto-updatable if there are changes in the application
  • 12. Record and playback Data driven Keyword driven BDD and Hybrid Selenium based frameworks. Do you want reinvent the wheel? Generations of test automation frameworks
  • 13. Most popular Selenium IDE No code needed Hard to maintain Record and playback
  • 14. Data Driven Testing Framework helps the user segregate the test script logic and the test data from each other External data from databases, csv, text files Data driven
  • 15. Common functions to perform actions keywords are stored in a step-by-step fashion with an associated object. Object mapping More in-depth programming knowledge Keyword driven
  • 16. Some of the top recognised automation QA engineers decided to crate frameworks “core” and share it with the rest of the world Much better to base your hybrid framework on them then reinventing the wheel. Barely support @Test public void userCanLoginByUsername() { open("/login"); $(By.name("user.name")).setValue("johny"); $("#submit").click(); $(".loading_progress").should(disappear); // Waits until element disappears $("#username").shouldHave(text("Hello, Johny!")); // Waits until element gets text } Selenium based frameworks
  • 17. Behavior Driven Development frameworks allow automation of functional validations in easily readable and understandable format to Business Analysts, Developers, Testers, etc. Combination of one or more than one above mentioned. Users don’t necessarily need to be acquainted with programming. Adapted to get the best results Hybrid, the most popular approach nowadays BDD and Hybrids frameworks
  • 19. Group of libraries that define coding standard , concepts, processes to support automated testing. So we can follow these guidelines while automating application to take advantages of various productive results. Reuse, coding faster... What is an Automation framework
  • 20. How does an automation framework works?
  • 21. Object mapping Steps Test cases Schedule How does an automation framework works?
  • 23. The page object is a design pattern for enhancing test maintenance and reducing code duplication Page Object Model Clean separation between test code and page specific code such as locators and layout. Providing higher-level operations than the exposure of elements: for example, filling a form with a single method that contains default values for most of the inputs. It improves the readability and allows us to create interactive documentation POM creates our testing code maintainable, reusable.
  • 24. The PageFactory Class in Selenium is an extension to the Page Object design pattern. It is used to initialize the elements of the Page Object or instantiate the Page Objects itself Page Factory we use annotations @FindBy to find WebElement. We use initElements method to initialize web elements
  • 26. Q&A