Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test...

17
Improve Functional Testing via Model-Based Automated Test Design TCE Vinay Kumar

Transcript of Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test...

Page 1: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Improve Functional Testing via Model-Based Automated Test

Design

TCEVinay Kumar

Page 2: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Agenda

• Background- Introduction to MBT

• Case study- Piloting MBT

� Pre-requisite� System modeling

2 HONEYWELL - CONFIDENTIAL File Number

� System modeling� Test generation� Test harness & adaptor developer� Executable test script/Test framework

- Observations� Quality� Automation advantage� Demands process up shift� Project & Tool selection� ROI

Page 3: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

BackgroundBackground

Page 4: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Model Based Testing

• Concept- Black box, Functional testing methodology- “ Model-based testing is automation of test design” - A model representation of system is used to auto generatetest design

for the system

4 HONEYWELL - CONFIDENTIAL File Number

Model

Automated Test Design

Test Artifacts

Page 5: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Model Based Testing

ATD Test Design

Test Scripts(Executable)

Interface

Model

1 3

5 HONEYWELL - CONFIDENTIAL File Number

ATD(Tool)

Test Design(Documents)

Test ManagementInterface

2

4

Page 6: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Case StudyCase Study

Piloting MBT

Page 7: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Pre-requisite

• Team- UML modeling & programming skill

� UML notation familiarity (State chart)� Not necessarily design skills� Should be capable of converting plain English requirement specification in

UML state chart and action language Java

- Test execution automation expert� Automation script library development

- Domain expert

7 HONEYWELL - CONFIDENTIAL File Number

- Domain expert

• Infrastructure- MBT tool (Qtronic)

• Automatic test execution - Feasibility of Automatic test execution should be nearing to 100%

• Well documented requirement specification

Page 8: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Pilot Flow

StartProject Selection Team Formation System Modeling Model

Review

Model Rework

Test Generation

Cycle

8 HONEYWELL - CONFIDENTIAL File Number

Test script/Framework

Review Test

Result

Cycle

Test Execution

EndTest

Review

Automation Harness Development

Need interface in

Model

Test Oracle

Test Management

Page 9: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

System Modeling

• Black box • Functional aspects• The Model must represent exact system behavior as

described in system specification and requirement o r the documentation

9 HONEYWELL - CONFIDENTIAL File Number

UML + Java =Model

Page 10: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Model Review

• Think model as a computer program• Needs deep review• Coding errors should not alter functional behavior

of the system under test

10 HONEYWELL - CONFIDENTIAL File Number

Function call

Page 11: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Test Generation

• Automatic test case generation from abstract system model

• Auto generate test document for manual test execution in given template

11 HONEYWELL - CONFIDENTIAL File Number

Model ATD (Tool)

Auto-generatedTest Design

IncorrectTest cases

? Review test casesModify modelA

Y

N

Page 12: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Test Harness

Glue CodeFramework Sheet•Test cases & data

Auto-generatedTest Design

• Generates executable script• Need one time effort to develop glue code

12 HONEYWELL - CONFIDENTIAL File Number

AutomatedTest Execution

Tool

•Test cases & data

Page 13: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Case StudyCase Study

Observations

Page 14: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Conclusion

• Key benefits- High productivity during maintenance and change req uests

14 HONEYWELL - CONFIDENTIAL File Number

Page 15: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Conclusion

• Test Quality- Test case quality is a stamp of the Model

• Automation advantage- Modeling of the system necessitates a deep thinking about the system

that aids the project and architect to deliver a highly mature product. This “extra” thinking process finds specification ambiguities, omissions, and conflicts.

- The support of various test execution environments through a customizable interface gives end to end automation from test design to test execution and management

15 HONEYWELL - CONFIDENTIAL File Number

test execution and management

• Demands process change- It introduces formal modeling and modifies the test development

processes. Competency building within the conventional tester could be an issue because of the modeling and programming skill demand of MBT tools.

• Project & Tool Selection- Model based testing is suitable for functional testing (as a black box) and

brings more value for projects having an automated test execution environment

Page 16: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Contd..

• ROI- More/Same/less cycle time in 1st iteration as compare to manual

testing� Depends on modeling & programming skill

- Benefit is more in subsequent iterations in case CRs and maintenance phase

- Better coverage

16 HONEYWELL - CONFIDENTIAL File Number

Learning 1 ~ 3 moths

System Model*2 ~ 3 weeks

Model Review~ 1 weeks

Script Library~ 1 weeks

* 10+ requirements,moderate complexity3 resources

Page 17: Improve Functional Testing via Model-Based Automated Test ... · Conclusion • Test Quality-Test case quality is a stamp of the Model• Automation advantage-Modeling of the system

Questions?Questions?

Thank You!!