ai-driven testing - a new era of test automation (camera ... · 5. ai and machine learning skills...

30
AI - DRIVEN TESTING A NEW ERA OF TEST AUTOMATION K I N G A R 2 7 M 2 0 1 9 AGENDA 2 ABOUT ME MOTIVATION: REDEFINING TEST AUTOMATION BACKGROUND: AI, MACHINE LEARNING, TESTING AI-DRIVEN TESTING: A NEW ERA OF TEST AUTOMATION CONCLUSION

Upload: others

Post on 10-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

AI-DRIVEN TESTINGA NEW ERA OF TEST AUTOMATION

KI

N G

AR

27

M

2

019

AGENDA

2

ABOUT ME

MOTIVATION: REDEFINING TEST AUTOMATION

BACKGROUND: AI, MACHINE LEARNING, TESTING

AI-DRIVEN TESTING: A NEW ERA OF TEST AUTOMATION

CONCLUSION

Page 2: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

3ADJUNCT PROFESSOR, COMPUTER SCIENCE

HEAD, QUALITY CENTER OF EXCELLENCE

3

AUTOMATIONMACHINES WORKING WITHOUT DIRECT HUMAN CONTROL

au·to·ma·tion/ˌôdəˈmāSH(ə)n/ noun

1. Capable of starting, operating, and completing independently.2. Use of various control systems for operating machinery and

equipment with minimal human intervention.

4

Page 3: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

5

6

Page 4: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

7

8

Page 5: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Artificial Intelligence for Software Testing (AIST)is an emerging field aimed at the developmentof AI systems to test software, methods to testAI systems, and ultimately designing softwarethat is capable of self-testing and self-healing.

9

AI-DRIVEN TESTING

TESTING AISYSTEMS

TOOLS METHODS

DESIGNS

SELF-TESTINGSYSTEMS10

Page 6: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

AI-DRIVEN TESTING

TESTING AISYSTEMS

SELF-TESTINGSYSTEMS

DESIGNS

METHODSTOOLS

11

12

Page 7: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

artificial intelligence:

: a branch of computer science dealing with thesimulation of intelligent behavior in computers

: the capability of a machine to imitate intelligenthuman behavior

1

2

13

14

Page 8: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Perceive and act in its environment using sensors and actuators, respectively.

Direct its activity toward goals and use knowledge and learning in achieving those goals.

Analyze itself in terms of behavior, error, and success and adapt online, possibly in real time.

Be organized with other agents, typically in a hierarchy to tackle problems at different abstraction levels.

Typically referred to as bots or AI.

AN AUTONOMOUS ENTITY THAT CAN…

INTELLIGENT AGENT

15

16

Page 9: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

machine learning:the science of getting computers to act without being explicitly programmed

17

If a program can improve how it performs a certain task based on previous experience then you can say the program has learnt.

18

Page 10: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

If the performance P of a computer program atcompleting a task T improves with experience E,the program is said to learn from experience E.

19

Hidden LayersInput Layer Output Layer

REWARD

PUNISH

20

Page 11: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

software testing:dynamic program verification using finite tests from an infinite execution domain

21

Input Output

Program(Function)

22

Page 12: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Program(Function)

Domain(Input)

Range(Output)

d f(d)

Is f (d) acceptable?

¬OK (d)

OK (d)

23

REWARD

PUNISH

Hidden LayersInput Layer Output Layer

24

Page 13: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Program(Function)

Domain(Input)

Range(Output)

OK(t1)OK (t2)OK (t3)OK (t4)OK (t5)

T

t5

t2t1

t3t4

D f(t1)

f(t2)

f(t4)

f(t3)

f(t5)

T is successful iff∀t ∈ $ %&(t)25

Program(Function)

Domain(Input)

Range(Output)

T

t5

t2t1

t3t4

D

T is an ideal test iff∀t ∈ $ %&(t) → ∀d ∈ + %&(d)

OK(d1)OK (d2)OK (d3)OK (d4)OK (d5)OK (d6)OK (d7)OK (d8)OK (d9)

:OK (d∞)

f(d1)

f(d2)

f(d4)

f(d3)

f(d5)

f(d8)

f(d7)

f(d6)

f(d9)

f(d∞)

26

Page 14: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Time

Com

plex

ity

/ Cov

erag

e

Source: AI for Software Testing, Jason Arbon, CEO, test.aihttps:/www.linkedin.com/pulse/ai-software-testing-jason-arbon

SoftwareComplexity

Conventional Test Coverage

Coverage Gap

27

Time

Com

plex

ity

/ Cov

erag

e

Source: AI for Software Testing, Jason Arbon, CEO, test.aihttps:/www.linkedin.com/pulse/ai-software-testing-jason-arbon

SoftwareComplexity

Conventional Test Coverage

AI-DrivenTest Coverage

28

Page 15: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

29

testrigor

AI-DRIVEN TESTINGFAD, FICTION, OR FUTURE?

30

Page 16: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

AI-DRIVEN TESTINGA NEW ERA OF TEST AUTOMATION

INTERACTGenerate actions to navigate through the application UI, input data, and verify observable outcomes.

LEARNDirect feedback on the quality of an agents actions to help improve future actions.

MODELKeep track of the application

and environment state to help deal with uncertainty

and partial observability.

EXPLOREPerceive the environment

including the application UI structure, behavior and any

differences over builds.

AIDT

APPROACHHOW BOTS LEARN TO TEST SOFTWARE

32

Page 17: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Punish

Rewrite

Reward

Reinforce

cart home

ML

PINCH TAP

APPROACHHOW BOTS LEARN TO TEST SOFTWARE

33

Monitor

Analyze Plan

Execute

AI-DRIVEN TEST BOT

Machine LearningKnowledge

ARCHITECTUREDEMYSTIFYING AI-DRIVEN TESTING BOTS

34

SEEDED BASE KNOWLEDGEACQUIRES NEW KNOWLEDGE

MAINTAINS EXISTING KNOWLEDGESHARES ITS KNOWLEDGE

MAPE + KML

Page 18: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

EXECUTIONQUEUE

EXECUTIONQUEUE

EXECUTIONQUEUE

AI-GENERATED TESTS

X X

EXPLORE AND GENERATE EXPLORE AND GENERATE EXPLORE AND GENERATERUN GENERATED TESTRUN GENERATED TEST

TEST RESULTS AND HISTORY

Monitor

Analyze Plan

Execute

TEST AGENT<<Coordinator>>

DEDUPE AND DISTRIBUTE

35

/AGENT-X/AGENT

http://github.com/UltimateSoftware

PROTOTYPESAI-GENERATION AND EXPLORATION IN TEST

36

Page 19: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

37

38

Page 20: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

39

FROM TEXT GENERATION TO TEST GENERATIONA LESSON LEARNED FROM ALICE IN WONDERLAND

~150,000 CharactersTotal in the book

47 Distinct CharactersWhen converted to lowercase

100-Length Subsequence TrainingN-Length Subsequence → Character Output

CHAPT → EHAPTE → R

Example (N=5)

40

Page 21: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

be no mistake about it: it wasneither more nor less than a pig,and she felt that it would be quite aelin that she was a little want oetoiet ano a grtpersent to the tas alittle war th tee the tase oa teettee thehad been tinhgtt a little toiee at thecadl in a long tuiee aedun thet sheerwas a little tare gereen to be a gentleof the tabdit soenee the gad ouw iethe tay a tirt of toiet at the was alittle anonersen, and thiu had beenwoite io a lott of tueh a tiie andtaede bot her aeain she cere thth thebene tith the tere bane to tee toaete totee the harter was a little tire the

same oare cade an anl ano the gareeand the was so seat the was a littlegareen and the sabdit, and thewhite rabbit wese tilel an the caoeand the sabbit se teeteer, and thewhite rabbit wese tilel an the cade ina lonk tfne the sabdi ano aroing totea the was sf teet whitg the was alittle tane oo thete the sabeit shewas a little tartig to the tar tf teethe tame of the cagd, and the whiterabbit was a little toiee to be anletite thete ofs and the tabdit was thewiite rabbit, and

gooder head. and said to herself, ‘itwas a little little shated of the mouseof the good of the courte, and it wasa little little shated in a little thatthe was a little little shated of thethmee said to see it was a littlebook of the was a little that she wasso sereated to hare a little the begansitee of the was of the was a littlethat she was so seally and thesabbit was a little lad good to thelittle gooder head of the gad searedto see it was a little lad good to thelittle good

she sabbit said to herself and thesabbit said to herself and the soodway of the was a little that she wasa little lad good to the garden, andthe sood of the mock turtle said toherself, 'it was a little that the mockturtle said to see it said to sea itsaid to sea it say it the marge hardsat hn a little that she was sosereated to herself, and she sabbitsaid to herself, 'it was a little littleshated of the sooe of the coomouse itwas a little lad good to the little

herself lying on the bank, with herhead in the lap of her sister, who wasgently brushing away so siee, and

Page 22: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

ABSTRACT TEST LANGUAGE

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

43

Observe ErrorMessageInput BLANK FirstName Invoke Submit Observe Required TextBox FirstName

First Name* Last Name*

Company

A Model-Based AI-Driven Test Generation System, Dionny Santiago. Masters Thesis Proposal, Florida International University (2018).

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

44

Page 23: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Observe ErrorMessage

IFPerceived Conditions

Input BLANK FirstName Invoke Submit Observe Required TextBox FirstName

First Name* Last Name*

Company

A Model-Based AI-Driven Test Generation System, Dionny Santiago. Masters Thesis Proposal, Florida International University (2018).

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

45

Observe ErrorMessage

IFPerceived Conditions

WHENInput Actions

Input BLANK FirstName Invoke Submit Observe Required TextBox FirstName

First Name* Last Name*

Company

A Model-Based AI-Driven Test Generation System, Dionny Santiago. Masters Thesis Proposal, Florida International University (2018).

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

46

Page 24: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

Observe ErrorMessage

IFPerceived Conditions

WHENInput Actions

THENRequired Observations

Input BLANK FirstName Invoke Submit Observe Required TextBox FirstName

First Name* Last Name*

Company

Please enter first name. Please enter last name.

A Model-Based AI-Driven Test Generation System, Dionny Santiago. Masters Thesis Proposal, Florida International University (2018).

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

47

AI-DRIVEN TEST GENERATIONMACHINES LEARNING FROM HUMAN TESTERS

Input Sentence Predicted Next Word

Observe Required

Observe Required Textbox

Observe Required Textbox FirstName

Observe Required Textbox FirstName Input

Observe Required Textbox FirstName Try VALID

Observe Required TextBox FirstName Try VALID FirstName Invoke

Observe Required TextBox FirstName Try VALID FirstName Click Submit

Observe Required TextBox FirstName Try VALID FirstName Click Commit NotObserve

Observe Required Textbox FirstName Try VALID FirstName Click Commit NotObserve ErrorMessage

48

Page 25: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

PESTICIDE FREEGenerates New Tests Each Time

Eliminates Pesticide Paradox

GENERAL PURPOSEDifferent Testing Types

Any Application or Domain

LARGE SCALEDeep Learning

Cloud Infrastructure

AI-DRIVEN TEST GENERATIONKEY ADVANTAGES

50

Page 26: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

LIMITATIONS?

51

Page 27: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

PROGRAM(Function)

INPUT(Domain)

OUTPUT(Range)

53

MACHINE LEARNING(Function)

INPUT(Domain)

OUTPUT(Range)

54

Page 28: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

SELF-TESTINGAI-DRIVEN TESTING FROM THE INSIDE-OUT

55

Self-Configure

Self-Optimize

Self-Heal

Self-Protect

Self-Test

Software Component

Monitor

Analyze Plan

ExecuteKnowledge

(Brain)

Autonomic Test Manager

A Self-Testing Approach for Autonomic Software, Tariq M. King. ProQuest Electronic Theses and Dissertations (2009).

AUTONOMIC SELF-TESTINGTESTING DYNAMICALLY ADAPTIVE SYSTEMS

56

Page 29: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

AI-DRIVEN TESTING

TESTING AISYSTEMS

SELF-TESTINGSYSTEMS

DESIGNS

METHODSTOOLS

57

AI-DRIVEN TESTING

TESTING AISYSTEMS

TOOLS METHODS

DESIGNS

SELF-TESTINGSYSTEMS58

Page 30: AI-Driven Testing - A New Era of Test Automation (Camera ... · 5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018. 6. Text

DIONNY SANTIAGO

DAVID ADAMO

JUSTIN PHILLIPS

PATRICK ALT

KEITH BRIGGS

NICOLETTE CELLI

PETER J. CLARKE

JASON ARBON

THANK YOUACKNOWLEDGEMENTS

59

REFERENCES1. Test Machina: Demystifying AI-Driven Testing Bots, Tariq M. King, Automation Guild, Feb 2019.

2. AI-Driven Testing: A New Era of Test Automation, Tariq M. King, CIO Review Software Testing Special, Dec 2018.

3. A Model-Based AI-Driven Test Generation System, Dionny Santiago, ProQuest Electronic Theses and Dissertations, Dec 2018.

4. Abstract Flow Learning for Web Application Test Generation, Dionny Santiago, Peter J. Clarke, Patrick Alt, and Tariq M. King, European Software Engineering Conference/Foundations of Software Engineering International Workshop on Automating TEST Case Design, Selection, and Evaluation, Nov 2018.

5. AI and Machine Learning Skills for the Testing World, Tariq M. King and Jason Arbon, STAREAST, May 2018.

6. Text Generation with LSTM Recurrent Neural Networks in Python with Keras, Jason Brownlee, Aug 2016.

7. A Self-Testing Approach to Autonomic Software, Tariq M. King, ProQuest Electronic Theses and Dissertations, Jul 2009.

8. Towards a Theory of Test Data Selection, John B. Goodenough and Susan L. Gerhart, International Conference on Reliable Software, Jun 1975.

60