SlideShare a Scribd company logo
@roesslerj1
How to apply AI to Testing
Dr. Jeremias Rößler
https://retest.de
@roesslerj2
• “99% of respondents face some kind of challenge with
testing in agile development.”
• “Test automation tools are fundamental to achieving
the continuous testing approach required by DevOps.”
• “by 2021, 50% of enterprises will leverage intelligent
test automation driven by AI and machine learning.”
*Source: Gartner 2017, Magic Quadrant for Software Test Automation
@roesslerj3
Problem: Software Testing ist komplex und erzeugt viel manuellen Aufwand
Trends: DevOps, Agile, Shift Left
32%
34%
34%
35%
36%
37%
35%
40%
45%
The Automation Challenges
Capgemini: 40% of the total IT budget will be allocated to QA
+ Testing in 2019.
Ideate/
analyze/plan Design/
Develop/Build
Test
Release
High Interest
Medium Interest
Low Interest
Source: Forrester Research, Inc
We don't have the right automation tools
Challenge with the Test Data and Environment Availability
Delivery methodology doesn't support test automation
We have difficulties to integrate the different automation
tools together
Application functionality changes too frequently
We don't have the right automation testing
process/method
Lack of stability of test script
Lack of skilled and experience test automation resource
We have difficulties to automate because of use of multiple
development lifecycles
*Source: World Quality Report 2016-17
@roesslerj4
@roesslerj5
@roesslerj6
1 - 2 = ?
• -1 is mathematically correct
• 0 if I don’t want to payback gift certificates to costumers
• 23 if I’m working with hours
• 59 if I’m working with minutes or seconds
• Something between 27 and 30 if I’m working with days
• 11 if I am working with months
• exception if I am working with degrees Kelvin
@roesslerj7
complexity
UITester Software
easy-to-use
intuitive
simple
@roesslerj8
component recognition
password (text)
username (text)
enter text (action)
click button (action)
complexity
UITester Software
@roesslerj9
Solution-Knowledge
Code
test
formalize
Tester
complexity
@roesslerj10
@roesslerj11
@roesslerj12
Oracle Problem
@roesslerj13
How do you bring AIinto testing?
@roesslerj14
How do YOU do Testing?
@roesslerj15
Testing
Actual wrong
Bug
Comparison Expected vs Actual
Test Execution
Done
No Difference
@roesslerj16
Actual wrong
Bug
Comparison Expected vs Actual
Update Expected
Expected wrong
Test Execution
Done
No Difference Difference
Evaluate Difference
Testing
@roesslerj17
When is a bug a bug?
When it’s not a feature!
@roesslerj18
Is it a bug?
.
..
text.c
other.files
for (. . .) {
if (name[0] == '.') continue;
. . .
}
ls
@roesslerj19
Is it a bug?
@roesslerj20
Is it a bug?
@roesslerj21
What is a bug?
Without specification, there are no bugs
— only surprises.
Brian Kernighan
“
@roesslerj22
Why do we test?
After
implementation?
1 + 1 = 3
2 + 2 = 4
@roesslerj23
@roesslerj24
@roesslerj25
@roesslerj26
Why do we test?
After
implementation?
1 + 1 = 3
2 + 2 = 4
After
change?
1 + 1 = 3
1 + 1 = 5
@roesslerj
automated
regression test
≠
test
27
@roesslerj
automated
regression test
=
version control
28
@roesslerj29
Why do we test?
After
implementation?
1 + 1 = 3
2 + 2 = 4
After
change?
1 + 1 = 3
1 + 1 = 5
1 + 1 = 2
@roesslerj30
@roesslerj31
Actual wrong
Bug
Comparison Expected vs Actual
Update Expected
Expected wrong
Test Execution
Done
No Difference Difference
Evaluate Difference
Testing
@roesslerj32
Actual wrong
Bug
Comparison Expected vs Actual
Update Expected
Expected wrong
Test Execution
Done
No Difference Difference
Evaluate Difference
Testing
effort
@roesslerj33
@Test
public void testReTestWebSiteClassic() throws Exception {
driver.get("https://retest.de");
assertThat(driver.getTitle()).isEqualTo("retest");
WebElement toDownload = driver.findElement(By.name("submit"));
toDownload.click();
assertTrue(driver.findElement(By.id("errorMsg")).isDisplayed());
}
@roesslerj34
@roesslerj35
public void testSomething() throws Exception {
// here be some test code ...
UIElement element = driver.getElement(“path/to/element”);
assertEquals(null, element.getAction());
assertEquals(“action”, element.getActionCommand());
assertEquals(true, element.isEnabled());
assertEquals(true, element.isFocusable());
assertEquals(“Lucida Grande”, element.getFont().getName());
assertEquals(13, element.getFont().getSize());
assertEquals(0, element.getFont().getStyle());
assertEquals(23, element.getHeight());
assertEquals(null, element.getIcon());
assertEquals(0, element.getMnemonic());
assertEquals(null, element.getPressedIcon());
assertEquals(true, element.isSelected());
assertEquals(“label”, element.getText());
assertEquals(119, element.getWidth());
assertEquals(27, element.getX());
assertEquals(191, element.getY());
}
@roesslerj36
@roesslerj37
@roesslerj38
@roesslerj39
@roesslerj40
@roesslerj41
@roesslerj42
Actual wrong
Bug
Comparison Expected vs Actual
Update Expected
Expected wrong
Test Execution
Done
No Difference Difference
Evaluate Difference
Testing
effort
effort
@roesslerj43
@roesslerj44
@roesslerj45
@roesslerj46
@roesslerj47
@roesslerj48
https://github.com/retest/recheck-web
@roesslerj49
@Test
public void testReTestWebSite() throws Exception {
driver.get("https://retest.de");
re.startTest();
re.check(driver, "index");
WebElement toDownload = driver.findElement(By.name("submit"));
toDownload.click();
re.check(driver, "download_1");
re.capTest();
}
v
@roesslerj50
Multilocators
@roesslerj51
@roesslerj52
// Use the RecheckDriver as a wrapper for your usual driver
driver = new RecheckDriver( new ChromeDriver() );
// Use the unbreakable recheck implementation.
re = new RecheckWebImpl();
// Single call instead of multiple assertions
re.check( driver, "index" );
// Will issue a warning, as the id has changed
driver.findElement( By.id( "intro-slider" ) );
@roesslerj53
*************** recheck warning ***************
The HTML id attribute used for element identification changed from 'intro-
slider' to 'introSlider'.
retest identified the element based on the persisted old state.
If you apply these changes to the state , your test will break.
Use `By.id("introSlider")` or `By.retestId("9c40281d-5655-4ffa-9c6d-
d079e01bb5a3")` to update your test.
@roesslerj54
Benefits of recheck:
- Reduce effort to create tests
- Reduce effort to maintain tests
- Tests are more complete
- Tests are less fragile
@roesslerj55
How do you bring AIinto testing?
@roesslerj56
Oracle Problem
@roesslerj57
@roesslerj58
@roesslerj59
Infinite-Monkey-Theorem:
A monkey hitting keys at random on a typewriter
for a long enough time
will type the complete works of William Shakespeare.
@roesslerj60
We replace the typewriter with a computer…
@roesslerj61
public static void main(String... args) throws Exception {
Robot robot = new Robot();
while (true) {
robot.mouseMove(random.nextInt(maxX), random.nextInt(maxY));
robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
robot.delay(200);
for (char inputChar : randomString().toCharArray()) {
robot.keyPress((int) inputChar);
robot.keyRelease((int) inputChar);
robot.delay(10);
}
robot.keyPress(KeyEvent.VK_ENTER);
robot.keyRelease(KeyEvent.VK_ENTER);
}
}
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
@roesslerj62
DEMO
@roesslerj63
@roesslerj64
- gremlins.js
- NetFlix Chaos Monkey
- UI/Application Exerciser Monkey
Open Source Products
@roesslerj65
@roesslerj66
@roesslerj
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14. 67
public static void main(String... args) throws Exception {
WebDriver driver = new FirefoxDriver();
driver.get("http://www.retest.de");
while (true) {
List<WebElement> links = driver.findElements(By.tagName("a"));
links.get(random.nextInt(links.size())).click();
Thread.sleep(500);
List<WebElement> fields =
driver.findElements(By.xpath("//input[@type='text']"));
WebElement field = fields.get(random.nextInt(fields.size()));
field.sendKeys(randomString());
Thread.sleep(500);
}
}
@roesslerj68
Intelligent Monkey
DEMO
@roesslerj69
@roesslerj70
@roesslerj71
@roesslerj72
@roesslerj73
Problem Space
Problem
Space
@roesslerj74
@roesslerj75
@roesslerj76
@roesslerj77
@roesslerj78
@roesslerj79
train
AI
Artificial
Neural Net
Genetic
Algorithm
AI
@roesslerj80
https://code.fb.com/developer-tools/sapienz-intelligent-automated-software-testing-at-scale/
@roesslerj81
test
1.0
approve
1.1
diff
train
user
automate
@roesslerj82
@roesslerj83
https://code.fb.com/developer-tools/finding-and-fixing-software-bugs-automatically-with-sapfix-and-sapienz/
Automatically Fixing Bugs
@roesslerj84
@roesslerj85
AI
read-back
@roesslerj86
AI
read-back
easy-to-use
intuitive
simple
@roesslerj
@roesslerjX
test
1.0
approve
1.1
diff
train
user
automate
@roesslerjX
https://github.com/retest/recheck-web
87
Summary
Difference Testing
little maintenance
no wasteful testing
yet more complete
Monkey-Testing:
cheaper
faster
better
multiplies manual tests
@roesslerj
roessler@retest.de
@roesslerj
Questions?
https://www.facebook.com/retest.de
http://retest.rocks

More Related Content

PPT
Testing with test_complete
PDF
UI Testing Automation
PPTX
Introduction about Full stack Development
PPT
Automation testing
PPTX
An Introduction to Unit Testing
PDF
Regression Test Automation Framework
PPT
Test automation process
PPT
Best Practices of Software Development
Testing with test_complete
UI Testing Automation
Introduction about Full stack Development
Automation testing
An Introduction to Unit Testing
Regression Test Automation Framework
Test automation process
Best Practices of Software Development

What's hot (20)

PDF
Introduction to Android Development
PPTX
Automation Testing
PPTX
Android app development ppt
PPT
Selenium ppt
PPT
Automation With A Tool Demo
PDF
User Interface Testing. What is UI Testing and Why it is so important?
PPT
PPTX
Observer Software Design Pattern
PDF
What is JUnit? | Edureka
PDF
Test Automation
PPTX
Mobile Automation with Appium
PDF
Criando uma arquitetura para seus testes de API com RestAssured
PPTX
Industrial Internet of Things (IIOT)
PPT
Learning typescript
PDF
What Is Functional Testing?
PDF
Testing with Spring: An Introduction
PPTX
Android Project Presentation
PPTX
UNIT TESTING
PDF
Artificial Intelligence for Automated Software Testing
PPT
05 junit
Introduction to Android Development
Automation Testing
Android app development ppt
Selenium ppt
Automation With A Tool Demo
User Interface Testing. What is UI Testing and Why it is so important?
Observer Software Design Pattern
What is JUnit? | Edureka
Test Automation
Mobile Automation with Appium
Criando uma arquitetura para seus testes de API com RestAssured
Industrial Internet of Things (IIOT)
Learning typescript
What Is Functional Testing?
Testing with Spring: An Introduction
Android Project Presentation
UNIT TESTING
Artificial Intelligence for Automated Software Testing
05 junit
Ad

Similar to How to apply AI to Testing (20)

PDF
Automating Tactically vs Strategically SauceCon 2020
PDF
Odinstar 2017 - Real World Automating to Support Testing
PDF
SELJE_Database_Unit_Testing.pdf
PPT
The Magic Of Application Lifecycle Management In Vs Public
PDF
Practical Test Automation Deep Dive
PPTX
Testing ASP.NET - Progressive.NET
PPTX
How we tested our code "Google way"
PDF
Unit Testing
PDF
Building functional Quality Gates with ReportPortal
PPT
AAA Automated Testing
PDF
Software Testing for SEO
PPTX
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
PDF
iPullRank Webinar - Automated Testing For SEO With Hamlet Batista
PPTX
Unit tests & TDD
PPTX
TDD Best Practices
PDF
Testing Experience - Evolution of Test Automation Frameworks
PDF
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
PDF
UCM Tips Nagaraj's knowledge planet
PDF
Testing without assertions - #HUSTEF2019
PPTX
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
Automating Tactically vs Strategically SauceCon 2020
Odinstar 2017 - Real World Automating to Support Testing
SELJE_Database_Unit_Testing.pdf
The Magic Of Application Lifecycle Management In Vs Public
Practical Test Automation Deep Dive
Testing ASP.NET - Progressive.NET
How we tested our code "Google way"
Unit Testing
Building functional Quality Gates with ReportPortal
AAA Automated Testing
Software Testing for SEO
GlobalLogic Test Automation Online TechTalk “Test Driven Development as a Per...
iPullRank Webinar - Automated Testing For SEO With Hamlet Batista
Unit tests & TDD
TDD Best Practices
Testing Experience - Evolution of Test Automation Frameworks
Carmen Popoviciu - Protractor styleguide | Codemotion Milan 2015
UCM Tips Nagaraj's knowledge planet
Testing without assertions - #HUSTEF2019
assertYourself - Breaking the Theories and Assumptions of Unit Testing in Flex
Ad

More from SAP SE (12)

PDF
Informationstechnik
PDF
Managing bias in data
PDF
Testing Without Assertions
PDF
Testing without Assertions
PDF
recheck and the Sorcerer's Stone: Turning Selenium into Adamantium
PDF
Lightning Talk: When will AI take my Job as a Tester
PDF
Testing ohne assertions
PDF
When will ai take my job as a tester
PDF
AI and the End of the World
PDF
Wie man KI ins Testing bringt
PDF
Bei uns testen lauter Affen - Das Ende der Banensoftware
KEY
Isolating Failure Causes through Test Case Generation
Informationstechnik
Managing bias in data
Testing Without Assertions
Testing without Assertions
recheck and the Sorcerer's Stone: Turning Selenium into Adamantium
Lightning Talk: When will AI take my Job as a Tester
Testing ohne assertions
When will ai take my job as a tester
AI and the End of the World
Wie man KI ins Testing bringt
Bei uns testen lauter Affen - Das Ende der Banensoftware
Isolating Failure Causes through Test Case Generation

Recently uploaded (20)

PDF
top salesforce developer skills in 2025.pdf
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
medical staffing services at VALiNTRY
PPTX
Essential Infomation Tech presentation.pptx
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
System and Network Administration Chapter 2
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PDF
Design an Analysis of Algorithms I-SECS-1021-03
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Understanding Forklifts - TECH EHS Solution
top salesforce developer skills in 2025.pdf
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms II-SECS-1021-03
medical staffing services at VALiNTRY
Essential Infomation Tech presentation.pptx
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
System and Network Administration Chapter 2
Which alternative to Crystal Reports is best for small or large businesses.pdf
Design an Analysis of Algorithms I-SECS-1021-03
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
CHAPTER 2 - PM Management and IT Context
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
Upgrade and Innovation Strategies for SAP ERP Customers
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Navsoft: AI-Powered Business Solutions & Custom Software Development
Understanding Forklifts - TECH EHS Solution

How to apply AI to Testing