for testers - anztb ai and...relevant context testing neural net ranker personalized web search and...

46
AI and Machine Learning For Testers Jason Arbon @jarbon [email protected]

Upload: others

Post on 18-Aug-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AI and Machine LearningFor Testers

Jason Arbon@jarbon [email protected]

Page 2: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 3: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Relevant Context

Testing Neural Net Ranker

Personalized Web Search and Chrome Test Automation

AI for Mobile Test Automation

Page 4: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AITesting.org

Page 5: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 6: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Testing: Apply Inputs, checking outputs.

Page 7: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

https://www.extremetech.com/extreme/215170-artificial-neural-networks-are-changing-the-world-what-are-they

AI: Apply Inputs, check outputs

Page 8: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Features

Complexity increases

exponentially as new features and

states interact with existing

featuresTests

Test coverage grows linearly

because tests can only be added

one at a time

Time

Co

mp

lexi

ty /

Co

vera

ge

COVERAGE GAP

Testing Needs AI

Page 9: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 10: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

HOW A BOT LEARNS TO TAP, TYPE, AND SWIPE

Page 11: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 12: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Key Problems in Test Automation

1. Have to Code2. Element Selection

3. Test Step Sequencing

solved by AI systems

Page 13: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 14: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

VS

Element Identification

Test.aiAuto Labeled

Quick Visual Custom Labeling

Selenium IDEPain Finding IdentifiersHave to write code. (brittle)

Old / Past

Page 15: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 16: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

IDENTIFYING APP STATE

Page 17: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AI Auto-trains to recognize all elements and pages in your app

Page 18: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AI REPLACES HARD-CRAFTED TEST CASES

Page 19: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

VS

Step Sequencing

Selenium IDEHave to code exact steps.Brittle when app changes.

Test.aiFamiliar Cucumber/GherkinOnly list labels of interesting

steps and verifications.Also, GUI Editor

Old / Past

Page 20: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 22: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Where’s the AI? Reinforcement learning

Robust testing

Instead of prescriptive tests, capture user intent

“Go to the shopping cart”

Page 23: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AIT - Open - Manual Too

Page 24: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

VS

Test ExecutionOld / Past

Page 25: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

VS

Test Reporting

Selenium IDEMany Tests Flaky/Break as app ChangesSimple pass/fail

Test.aiQ-Learning Test Step Generation

Element Classifiers at runtimeSee Test Steps.

Presentable.

Old / Past

Page 26: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation
Page 28: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

HARNESSING COLLECTIVE INTELLIGENCE FOR TESTING

Page 29: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

How to test AI?

Page 30: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

https://www.extremetech.com/extreme/215170-artificial-neural-networks-are-changing-the-world-what-are-they

30

Testing AI: Test Boundary + InputTest Data outside the range of Training Data. Errors are at the margins.

Page 31: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What We Do31

Testing AI: Test Boundary InputTest Data outside the range of Training Data. Errors are at the margins.

Page 32: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What We Do32

Testing AI: Feature Correctness

AI “input” correctness● Features computed correctly● E.g. “#words on page”● Representative Sample?● Bad/Partial data?● Sample Temporal/Domain relevance?

Page 33: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Credit: https://www.researchgate.net/figure/224915935_fig2_Figure-1-Neural-Network-Architectures-Used-in-the-SimulationsTwo-different-neural33

Testing AI: Each new build--consider it a new implementation

Page 34: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Credit: https://www.wolfram.com34

Testing AI: “Drift”

Networks are randomly initialized

New network might be just as accurate as last networkON AVERAGE

Test for the texture change.

Mapping from network output -> product output functionally correct.

Page 35: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Our Story35

Testing AI: Action / Flow Graphs

Page 36: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Our Story36

Testing AI: App Generation and Traversal

Page 37: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

Our Story37

Testing AI: Test Graph Generation and Traversal

Page 38: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What is Next?

Page 39: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What We Do39

Testing AI: “DARPA HARD”

Page 40: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What We Do40

Humans vs Bots

Humans Train Bots in Course of Work

Humans Remain to Personalize and Re-train bots.

Little testing that AI cannot do “soon”

Page 41: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

What We Do41

Abstract Intent Language: AIT

Focus on Intent, not “how”

Human Readable

App-Independant

Page 42: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

[email protected]

@jarbon

Page 43: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

EXAMPLE: HOW TO DETECT A BUG

Page 44: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

ML : Subjective or complex labels via Humans

Page 45: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

AI for Testing: Input

Reduce input space

150 actions per page

35 steps -> 150^35 = 10^78 paths

#atoms in universe10^78...

Page 46: For Testers - ANZTB AI and...Relevant Context Testing Neural Net Ranker Personalized Web Search and Chrome Test Automation AI for Mobile Test Automation

ML: Page Label Training