Lessons learnt from using DSLs for Automated Software Testing - - PowerPoint PPT Presentation

lessons learnt from using dsls for automated software
SMART_READER_LITE
LIVE PREVIEW

Lessons learnt from using DSLs for Automated Software Testing - - PowerPoint PPT Presentation

Lessons learnt from using DSLs for Automated Software Testing TAIC-PART 2015 Mark Micallef, Christian Colombo PEST Research Lab, University of Malta Tuesday, April 07, 2015 Product Owner Developer Project Manager Tester / QA Isnt this


slide-1
SLIDE 1

Lessons learnt from using DSLs for Automated Software Testing TAIC-PART 2015

Mark Micallef, Christian Colombo PEST Research Lab, University of Malta Tuesday, April 07, 2015

slide-2
SLIDE 2

Product Owner Developer Tester / QA Project Manager

slide-3
SLIDE 3

Isn’t this already being done?

Given I am a premium user When I place a bet on a football match And I win the bet Then I will win 10% more than the advertised odds for the match

slide-4
SLIDE 4

Domain Specific Languages (DSLs)

“A computer programming language of limited expressiveness focused on a particular domain” Martin Fowler Internal vs External DSLs

slide-5
SLIDE 5

Can we utilise DSLs in Software Testing?

Setup Setup Exercise Exercise Verify Verify Teardown Teardown

Test Case Smoke Test System Test Integration Test Test Suite Accessibility Test Performance Test Test Environment Regression Test

slide-6
SLIDE 6

Can we utilise DSLs in Software Testing?

Testing Domain System Domain

slide-7
SLIDE 7

Can we utilise DSLs in Software Testing?

slide-8
SLIDE 8

Vision

Tests expressed in an external DSL Tests expressed in an external DSL Compiler/Interpreter Compiler/Interpreter Automated Testing Framework Automated Testing Framework System Under Test System Under Test

slide-9
SLIDE 9

Challenges

Language Design Engineering Challenge

slide-10
SLIDE 10

Three Case Studies

Well-Defined Domains Undefined Domains Android GUI Applications E-Commerce Applications Graphical Games

slide-11
SLIDE 11

Challenge 1: Language Design

slide-12
SLIDE 12

Characteristics of a good DSL

  • 1. Domain Specific
  • 2. Simple
  • 3. Reusable
  • 4. General
  • 5. Extensible
  • 6. Similarity to other familiar languages
  • 7. Complete
  • 8. Orthogonal
slide-13
SLIDE 13

Common Language Elements

 Testing domain remains constant across case studies  Typical notions:

 Test Suites  Tests  Test life cycle

Test Setup Exercising the SUT Verification of expected behaviour Test Tear Down

 Reusable procedure-type mechanisms

slide-14
SLIDE 14

Common Language Elements

DEFINE Test Suite “Calculator Test Suite” DEFINE Setup ... END DEFINE Test “Simple Addition” ... END DEFINE Test “Divide by zero” ... END DEFINE Teardown ... END END

slide-15
SLIDE 15

Engineering Challenges

Interacting with the system under test Readability/Maintainability of generated code

slide-16
SLIDE 16

Conclusions

 The use of DSLs for specifying and executing test has promise  Different criteria of language design gain prominence depending on characteristics of games  Engineering challenges are surmountable, especially if there is good cooperation with developers  Questions

 Who curates/owns the language?  What effect will a change on the language have on existing scripts?  How is that process controlled?  Who maintains code generators and how?

slide-17
SLIDE 17

Future Work

 Gauge industry opinion  Carry out more industry case studies  Look at improving the current state-of-the-art in the industry