SlideShare a Scribd company logo
1 of 62
Download to read offline
Automating Tactically and Strategically
Alan Richardson
4 www.eviltester.com
4 www.compendiumdev.co.uk
4 @eviltester
TESTING ASSEMBLY 09/2017, Helsinki
Do you automate tactically
or strategically?
Automating Tactically
allows us to move fast, and
target immediate needs
Automating Strategically
allows us to gain budget
and support for longer
periods of work
We may believe we are
automating strategically
but are actually automating
tactically
Combine tactical and
strategic approaches to
better our testing efforts.
Secrets of Successful Practical
Automating
4 Get work done
4 Automate Flows
4 Multiple Abstractions
4 Abstract to libraries, not frameworks
Testing field argues about
4 Testing vs Checking
4 You can't automate testing
"Test Automation" is contentious
An Example
"Is what follows a
Test?" ...
@Test
public void createPreviewMVP() throws IOException {
String args[] = {
new File(System.getProperty("user.dir"),
"pandocifier.properties").getAbsolutePath()};
new PandocifierCLI().main(args);
String propertyFileName = args[0];
File propertyFile = new File(propertyFileName);
PandocifierConfig config;
config = new PandocifierConfigFileReader().
fromPropertyFile(propertyFile);
Assert.assertTrue(new File(
config.getPreviewFileName()).exists());
}
An Example "Ce n'est pas un test", ...
4 a Test, it says it is a @Test
4 an Automated Test, it checks something (file exists)
4 an Automated Test, it Asserts on the check
4 a Tool - I use it to automatically build one of my
books
4 not an Application - it doesn't have a GUI or a
standalone execution build
This is automated
execution of a
process
We Automate Parts of our
Development Process:
Coding, Checking,
Asserting, ...
Tactical Reality - I don't
really care, I just want to
get work done
Suggests we also have 'strategic
reality'
Tools vs Abstractions
4 Gherkin
4 Specflow, Cucumber
- - - - - - - - - - - - - -
4 Gherkin is a DSL templating language
4 Specflow, Cucumber are template parsers
4 We have to create abstractions to fill in the gap
E. W. Djkstra on Abstraction
"The purpose of abstraction is not to be
vague, but to create a new semantic level in
which one can be absolutely precise."
4 1972 ACM Turing Lecture: 'The Humble Programmer'
Regression Testing
The system rarely actually suffers
"Regression"
Continuous Condition Assertion
4 TDD, ATDD, Automated execution
4 All of these provide an ongoing safety net which
might mean we don't need to revisit areas in the
future (if we also tested them)
4 They don't mean that we have 'tested' them now
Coverage - All coverage is Model Based
4 Code coverage based on source code model
4 What about requirements, system interfaces,
states, flows?
4 Code coverage is a useful metric for TDD coverage
4 coverage models based on risk
Tactical vs Strategic
Automating
Strategic does not mean 'strategy
document'
Automating as part of a
Testing Strategy
Automating Tactically vs Strategically
What is Tactical? What is Strategic?
Solve a problem Agreed & Understood Goals
Short Term Long Term
Change as necessary Slower to Change
Your Time 'project' time
Warning - sometimes tactics look like
strategy
4 Use of Jenkins is not Continuous Integration
4 Cucumber/Specflow (Gherkin) != ATDD or BDD
4 Automated Deployments != Continuous Delivery
4 Containers != always good environment provision
4 Page Objects != always good system abstractions
You know you are Automating
strategically when...
4 Reduced Maintenance & Change
4 Everyone agrees why
4 No fighting for 'time'
4 It's not about roles
4 It gets done
How do we automate?
4 not about "test automation"
4 it is about automating tasks
4 automate the assertions used to check that the
stories are still 'done'
Automate flows through
the system
- vary data
- abstract the execution
Automating Strategically with
Abstractions
see also "Domain Driven Design"
"modeling the system in code"
4 abstractions are about modelling - people seem to be
scared of having too many models
No Abstractions - Web
Testing Example
@Test
public void canCreateAToDoWithNoAbstraction(){
WebDriver driver = new FirefoxDriver();
driver.get("http://todomvc.com/architecture-examples/backbone/");
int originalNumberOfTodos = driver.findElements(
By.cssSelector("ul#todo-list li")).size();
WebElement createTodo = driver.findElement(By.id("new-todo"));
createTodo.click();
createTodo.sendKeys("new task");
createTodo.sendKeys(Keys.ENTER);
assertThat(driver.findElement(By.id("filters")).isDisplayed(), is(true));
int newToDos = driver.findElements(
By.cssSelector("ul#todo-list li")).size();
assertThat(newToDos, greaterThan(originalNumberOfTodos));
}
But there were Abstractions (Lots of them)
4 WebDriver - abstration of browser
4 FirefoxDriver - abstraction Firefox (e.g. no version)
4 WebElement - abstraction of a dom element
4 createToDo - variable - named for clarity
4 Locator Abstractions via methods e.g. findElement
4 Manipulation Abstractions .sendKeys
4 Locator Strategies By.id
Using Abstractions - Same
flow
@Test
public void canCreateAToDoWithAbstraction(){
TodoMVCUser user =
new TodoMVCUser(driver, new TodoMVCSite());
user.opensApplication().and().createNewToDo("new task");
ApplicationPageFunctional page =
new ApplicationPageFunctional(driver,
new TodoMVCSite());
assertThat(page.getCountOfTodoDoItems(), is(1));
assertThat(page.isFooterVisible(), is(true));
}
What Abstractions were there?
4 TodoMVCUser
4 User
4 Intent/Action Based
4 High Level
4 ApplicationPageFunctional
4 Structural
4 Models the rendering of the application page
REST Test - No
Abstractions
@Test
public void aUserCanAccessWithBasicAuthHeader(){
given().
contentType("text/xml").
auth().preemptive().basic(
TestEnvDefaults.getAdminUserName(),
TestEnvDefaults.getAdminUserPassword()).
expect().
statusCode(200).
when().
get(TestEnvDefaults.getURL().toExternalForm() +
TracksApiEndPoints.todos);
}
But there were Abstractions
4 RESTAssured - given, when, then, expect, auth, etc.
4 RESTAssured is an abstraction layer
4 Environment abstractions i.e. TestEnvDefaults
Lots of Abstractions
But a lack of flexibility
Different abstractions to
support flexibility
@Test
public void aUserCanAuthenticateAndUseAPI(){
HttpMessageSender http = new HttpMessageSender(
TestEnvDefaults.getURL());
http.basicAuth( TestEnvDefaults.getAdminUserName(),
TestEnvDefaults.getAdminUserPassword());
Response response = http.getResponseFrom(
TracksApiEndPoints.todos);
Assert.assertEquals(200, response.getStatusCode());
}
An API Abstraction
@Test
public void aUserCanAuthenticateAndUseAPI(){
TodosApi api = new TodosApi(
TestTestEnvDefaults.getURL(),
TestEnvDefaults.getUser());
Response response = api.getTodos();
Assert.assertEquals(200, response.getStatusCode());
}
Automating API vs GUI
Automate at the interfaces
where you can interact
with the system.
Architecting to Support...
- Testing - Support
- Deployment - Automating
- Monitoring - Devops
- Releasing - etc.
Abstractions support different types
of testing
4 regular automated execution with assertions
4 creation and maintenance by many roles
4 exploratory testing
4 stress/performance testing (bot example) requires
thread safe abstractions
Good abstractions
encourage creativity, they
do not force compliance and
restrict flexibility.
Supports Law of Requisite
Variety
"only variety can destroy variety" -
W. Ross Ashby
"only variety can absorb variety" -
Stafford Beer
Frameworks can 'Destroy' variety
4 Frameworks force us to comply with their structure
4 or things get 'hard'
4 or we don't reap the benefits from the Framework
4 Some things are not possible
4 Some things never occur to you to do
We have a lot of models
4 user intent model - what I want to achieve
4 user action model - how I do that
4 interface messaging model - how the system
implements that
4 admin models, support models, GUI models
And models overlap
e.g. user can use the API or the GUI to
do the same things
When we don't do this
4 test code takes a long time to maintain
4 test code takes too long to write
4 test code is hard to understand
4 test code is brittle - "every time we change the app
the tests break/ we have to change test code"
4 execution is flaky - intermittent test runs - "try
running the tests again"
Example: Tactical Approach on Agile
projects
4 exploratory testing to get the story to done
4 create a tech debt backlog for 'missing' automated
tests
4 @Test code is tactical and we can knock it up (not as
good as production)
Example: Strategic Approach on Agile
Projects
4 automate assertion checking of acceptance criteria
for "done"
4 ongoing execution of the assertions for the life of
the story
Example: Strategic Approach on Agile
Projects implies...
4 maintained for the life of the story in the application
4 deleting the @Test code when no longer relevant
4 amending code structure to make relevant as stories
change and evolve
4 @Test code is strategic asset (just like production
code)
Why labour the point?
4 "test automation" often means "testers do the
automating"
4 testers may not program as well as programmers
4 testers may not know various programming patterns
4 when programmers see @Test code written by testers
they often don't want to touch it or maintain it
Move from Abstractions
such as 'Programming' and
'Testing' to 'Developing'
I say I'm a "Test
Consultant"
I'm really a "Software Development
Consultant"
Testing is Part of the Development
process
Summary
4 Automate Strategically
4 ongoing assertion checking automated in @Test code
4 Abstractions model the system in code
4 Write abstractions at multiple levels
4 Good abstractions can support exploratory testing
4 Write good code all the time
Learn to "Be Evil"
4 www.eviltester.com
4 @eviltester
4 www.youtube.com/user/EviltesterVideos
Learn About Alan Richardson
4 www.compendiumdev.co.uk
4 uk.linkedin.com/in/eviltester
Follow
4 Linkedin - @eviltester
4 Twitter - @eviltester
4 Instagram - @eviltester
4 Facebook - @eviltester
4 Youtube - EvilTesterVideos
4 Pinterest - @eviltester
4 Github - @eviltester
BIO
Alan is a test consultant who enjoys testing at a
technical level using techniques from psychotherapy
and computer science. Alan is the author of the books
"Dear Evil Tester", "Java For Testers" and "Automating
and Testing a REST API". Alan's main website is
compendiumdev.co.uk and he blogs at
blog.eviltester.com (see also TesterHQ.com)

More Related Content

What's hot

Odinstar 2017 - Real World Automating to Support Testing
Odinstar 2017 - Real World Automating to Support TestingOdinstar 2017 - Real World Automating to Support Testing
Odinstar 2017 - Real World Automating to Support TestingAlan Richardson
 
Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Alan Richardson
 
Your Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyYour Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyAlan Richardson
 
Secrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesSecrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesAlan Richardson
 
How To Test With Agility
How To Test With AgilityHow To Test With Agility
How To Test With AgilityAlan Richardson
 
How to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 KeynoteHow to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 KeynoteAlan Richardson
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment TestingAlan Richardson
 
Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Alan Richardson
 
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...Alan Richardson
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based TestingAlan Richardson
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonAlan Richardson
 
Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)Alan Richardson
 
What is Regression Testing?
What is Regression Testing?What is Regression Testing?
What is Regression Testing?Alan Richardson
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When AutomatingAlan Richardson
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialAlan Richardson
 
The Evil Tester's Guide to HTTP proxies Tutorial
The Evil Tester's Guide to HTTP proxies TutorialThe Evil Tester's Guide to HTTP proxies Tutorial
The Evil Tester's Guide to HTTP proxies TutorialAlan Richardson
 
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...Alan Richardson
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameAlan Richardson
 
When will ai take my job as a tester
When will ai take my job as a testerWhen will ai take my job as a tester
When will ai take my job as a testerSAP SE
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to TestingSAP SE
 

What's hot (20)

Odinstar 2017 - Real World Automating to Support Testing
Odinstar 2017 - Real World Automating to Support TestingOdinstar 2017 - Real World Automating to Support Testing
Odinstar 2017 - Real World Automating to Support Testing
 
Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009Open source tools - Test Management Summit - 2009
Open source tools - Test Management Summit - 2009
 
Your Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be FlakyYour Automated Execution Does Not Have to be Flaky
Your Automated Execution Does Not Have to be Flaky
 
Secrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slidesSecrets and Mysteries of Automated Execution Keynote slides
Secrets and Mysteries of Automated Execution Keynote slides
 
How To Test With Agility
How To Test With AgilityHow To Test With Agility
How To Test With Agility
 
How to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 KeynoteHow to Improve Your Technical Test Ability - AADays 2015 Keynote
How to Improve Your Technical Test Ability - AADays 2015 Keynote
 
Automating to Augment Testing
Automating to Augment TestingAutomating to Augment Testing
Automating to Augment Testing
 
Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021Add More Security To Your Testing and Automating - Saucecon 2021
Add More Security To Your Testing and Automating - Saucecon 2021
 
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
Risk Mitigation Using Exploratory and Technical Testing - QASymphony Webinar ...
 
Technology Based Testing
Technology Based TestingTechnology Based Testing
Technology Based Testing
 
Joy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan RichardsonJoy of Coding Conference 2019 slides - Alan Richardson
Joy of Coding Conference 2019 slides - Alan Richardson
 
Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)Re-thinking Test Automation and Test Process Modelling (in pictures)
Re-thinking Test Automation and Test Process Modelling (in pictures)
 
What is Regression Testing?
What is Regression Testing?What is Regression Testing?
What is Regression Testing?
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When Automating
 
Selenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver TutorialSelenium Clinic Eurostar 2012 WebDriver Tutorial
Selenium Clinic Eurostar 2012 WebDriver Tutorial
 
The Evil Tester's Guide to HTTP proxies Tutorial
The Evil Tester's Guide to HTTP proxies TutorialThe Evil Tester's Guide to HTTP proxies Tutorial
The Evil Tester's Guide to HTTP proxies Tutorial
 
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
FAQ - why does my code throw a null pointer exception - common reason #1 Rede...
 
Technical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" GameTechnical and Testing Challenges: Using the "Protect The Square" Game
Technical and Testing Challenges: Using the "Protect The Square" Game
 
When will ai take my job as a tester
When will ai take my job as a testerWhen will ai take my job as a tester
When will ai take my job as a tester
 
How to apply AI to Testing
How to apply AI to TestingHow to apply AI to Testing
How to apply AI to Testing
 

Similar to Automating Strategically or Tactically when Testing

Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksŁukasz Morawski
 
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingThe Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingPerfecto by Perforce
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverQA or the Highway
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of ToolsDawn Code
 
Lessons Learned in a Continuously Developing Service-Oriented Architecture
Lessons Learned in a Continuously Developing Service-Oriented ArchitectureLessons Learned in a Continuously Developing Service-Oriented Architecture
Lessons Learned in a Continuously Developing Service-Oriented Architecturemdwheele
 
To Automate or Not to Automate
To Automate or Not to Automate To Automate or Not to Automate
To Automate or Not to Automate Stephanie Abe
 
WEBINAR: To Automate or Not to Automate
WEBINAR: To Automate or Not to AutomateWEBINAR: To Automate or Not to Automate
WEBINAR: To Automate or Not to AutomateRainforest QA
 
The Testing Planet Issue 2
The Testing Planet Issue 2The Testing Planet Issue 2
The Testing Planet Issue 2Rosie Sherry
 
'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda 'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda TEST Huddle
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Developmentsatya sudheer
 
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalTLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalAnna Royzman
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databasesAlessandro Alpi
 
Automated testing-whitepaper
Automated testing-whitepaperAutomated testing-whitepaper
Automated testing-whitepaperimdurgesh
 
M. Holovaty, Концепции автоматизированного тестирования
M. Holovaty, Концепции автоматизированного тестированияM. Holovaty, Концепции автоматизированного тестирования
M. Holovaty, Концепции автоматизированного тестированияAlex
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspecjeffrey1ross
 
Testing 2 - Thinking Like A Tester
Testing 2 - Thinking Like A TesterTesting 2 - Thinking Like A Tester
Testing 2 - Thinking Like A TesterArleneAndrews2
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation ArchitectureErdem YILDIRIM
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4Billie Berzinskas
 
Susan windsor soft test 16th november 2005
Susan windsor soft test   16th november 2005Susan windsor soft test   16th november 2005
Susan windsor soft test 16th november 2005David O'Dowd
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Steven Smith
 

Similar to Automating Strategically or Tactically when Testing (20)

Testing Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation FrameworksTesting Experience - Evolution of Test Automation Frameworks
Testing Experience - Evolution of Test Automation Frameworks
 
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web TestingThe Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
The Automation Firehose: Be Strategic & Tactical With Your Mobile & Web Testing
 
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas HaverThe Automation Firehose: Be Strategic and Tactical by Thomas Haver
The Automation Firehose: Be Strategic and Tactical by Thomas Haver
 
A Sampling of Tools
A Sampling of ToolsA Sampling of Tools
A Sampling of Tools
 
Lessons Learned in a Continuously Developing Service-Oriented Architecture
Lessons Learned in a Continuously Developing Service-Oriented ArchitectureLessons Learned in a Continuously Developing Service-Oriented Architecture
Lessons Learned in a Continuously Developing Service-Oriented Architecture
 
To Automate or Not to Automate
To Automate or Not to Automate To Automate or Not to Automate
To Automate or Not to Automate
 
WEBINAR: To Automate or Not to Automate
WEBINAR: To Automate or Not to AutomateWEBINAR: To Automate or Not to Automate
WEBINAR: To Automate or Not to Automate
 
The Testing Planet Issue 2
The Testing Planet Issue 2The Testing Planet Issue 2
The Testing Planet Issue 2
 
'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda 'BIG Testing' with Hans Buwalda
'BIG Testing' with Hans Buwalda
 
Test Drive Development
Test Drive DevelopmentTest Drive Development
Test Drive Development
 
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and TacticalTLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
TLC2018 Thomas Haver: The Automation Firehose - Be Strategic and Tactical
 
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases#DOAW16 - DevOps@work Roma 2016 - Testing your databases
#DOAW16 - DevOps@work Roma 2016 - Testing your databases
 
Automated testing-whitepaper
Automated testing-whitepaperAutomated testing-whitepaper
Automated testing-whitepaper
 
M. Holovaty, Концепции автоматизированного тестирования
M. Holovaty, Концепции автоматизированного тестированияM. Holovaty, Концепции автоматизированного тестирования
M. Holovaty, Концепции автоматизированного тестирования
 
Beginners overview of automated testing with Rspec
Beginners overview of automated testing with RspecBeginners overview of automated testing with Rspec
Beginners overview of automated testing with Rspec
 
Testing 2 - Thinking Like A Tester
Testing 2 - Thinking Like A TesterTesting 2 - Thinking Like A Tester
Testing 2 - Thinking Like A Tester
 
6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture6 Traits of a Successful Test Automation Architecture
6 Traits of a Successful Test Automation Architecture
 
Coldbox developer training – session 4
Coldbox developer training – session 4Coldbox developer training – session 4
Coldbox developer training – session 4
 
Susan windsor soft test 16th november 2005
Susan windsor soft test   16th november 2005Susan windsor soft test   16th november 2005
Susan windsor soft test 16th november 2005
 
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
Design Pattern Mastery - Momentum Dev Con 19 Apr 2018
 

More from Alan Richardson

The Future of Testing Webinar
The Future of Testing WebinarThe Future of Testing Webinar
The Future of Testing WebinarAlan Richardson
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsAlan Richardson
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAlan Richardson
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST APIAlan Richardson
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzAlan Richardson
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to codeAlan Richardson
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.Alan Richardson
 
What is Agile Testing? A MindMap
What is Agile Testing? A MindMapWhat is Agile Testing? A MindMap
What is Agile Testing? A MindMapAlan Richardson
 
Evil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile TestingEvil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile TestingAlan Richardson
 
The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017Alan Richardson
 
Simple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setupSimple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setupAlan Richardson
 
Learning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public WorkshopLearning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public WorkshopAlan Richardson
 
How to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public SpeakingHow to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public SpeakingAlan Richardson
 

More from Alan Richardson (14)

The Future of Testing Webinar
The Future of Testing WebinarThe Future of Testing Webinar
The Future of Testing Webinar
 
Programming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStringsProgramming katas for Software Testers - CounterStrings
Programming katas for Software Testers - CounterStrings
 
About Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil TesterAbout Consultant Alan Richardson Compendium Developments Evil Tester
About Consultant Alan Richardson Compendium Developments Evil Tester
 
Shift left-testing
Shift left-testingShift left-testing
Shift left-testing
 
Automating and Testing a REST API
Automating and Testing a REST APIAutomating and Testing a REST API
Automating and Testing a REST API
 
TDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzzTDD - Test Driven Development - Java JUnit FizzBuzz
TDD - Test Driven Development - Java JUnit FizzBuzz
 
If you want to automate, you learn to code
If you want to automate, you learn to codeIf you want to automate, you learn to code
If you want to automate, you learn to code
 
What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.What is Testability vs Automatability? How to improve your Software Testing.
What is Testability vs Automatability? How to improve your Software Testing.
 
What is Agile Testing? A MindMap
What is Agile Testing? A MindMapWhat is Agile Testing? A MindMap
What is Agile Testing? A MindMap
 
Evil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile TestingEvil Tester's Guide to Agile Testing
Evil Tester's Guide to Agile Testing
 
The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017The Evil Tester Show - Episode 001 Halloween 2017
The Evil Tester Show - Episode 001 Halloween 2017
 
Simple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setupSimple ways to add and work with a `.jar` file in your local maven setup
Simple ways to add and work with a `.jar` file in your local maven setup
 
Learning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public WorkshopLearning in Public - A How to Speak in Public Workshop
Learning in Public - A How to Speak in Public Workshop
 
How to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public SpeakingHow to Practise to Remove Fear of Public Speaking
How to Practise to Remove Fear of Public Speaking
 

Recently uploaded

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...aditisharan08
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningVitsRangannavar
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 

Recently uploaded (20)

What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...Unit 1.1 Excite Part 1, class 9, cbse...
Unit 1.1 Excite Part 1, class 9, cbse...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
cybersecurity notes for mca students for learning
cybersecurity notes for mca students for learningcybersecurity notes for mca students for learning
cybersecurity notes for mca students for learning
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Naraina Delhi 💯Call Us 🔝8264348440🔝
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 

Automating Strategically or Tactically when Testing

  • 1. Automating Tactically and Strategically Alan Richardson 4 www.eviltester.com 4 www.compendiumdev.co.uk 4 @eviltester TESTING ASSEMBLY 09/2017, Helsinki
  • 2. Do you automate tactically or strategically?
  • 3. Automating Tactically allows us to move fast, and target immediate needs
  • 4. Automating Strategically allows us to gain budget and support for longer periods of work
  • 5. We may believe we are automating strategically but are actually automating tactically
  • 6. Combine tactical and strategic approaches to better our testing efforts.
  • 7. Secrets of Successful Practical Automating 4 Get work done 4 Automate Flows 4 Multiple Abstractions 4 Abstract to libraries, not frameworks
  • 8. Testing field argues about 4 Testing vs Checking 4 You can't automate testing "Test Automation" is contentious
  • 9. An Example "Is what follows a Test?" ...
  • 10. @Test public void createPreviewMVP() throws IOException { String args[] = { new File(System.getProperty("user.dir"), "pandocifier.properties").getAbsolutePath()}; new PandocifierCLI().main(args); String propertyFileName = args[0]; File propertyFile = new File(propertyFileName); PandocifierConfig config; config = new PandocifierConfigFileReader(). fromPropertyFile(propertyFile); Assert.assertTrue(new File( config.getPreviewFileName()).exists()); }
  • 11. An Example "Ce n'est pas un test", ... 4 a Test, it says it is a @Test 4 an Automated Test, it checks something (file exists) 4 an Automated Test, it Asserts on the check 4 a Tool - I use it to automatically build one of my books 4 not an Application - it doesn't have a GUI or a standalone execution build
  • 13. We Automate Parts of our Development Process: Coding, Checking, Asserting, ...
  • 14.
  • 15. Tactical Reality - I don't really care, I just want to get work done Suggests we also have 'strategic reality'
  • 16. Tools vs Abstractions 4 Gherkin 4 Specflow, Cucumber - - - - - - - - - - - - - - 4 Gherkin is a DSL templating language 4 Specflow, Cucumber are template parsers 4 We have to create abstractions to fill in the gap
  • 17. E. W. Djkstra on Abstraction "The purpose of abstraction is not to be vague, but to create a new semantic level in which one can be absolutely precise." 4 1972 ACM Turing Lecture: 'The Humble Programmer'
  • 18. Regression Testing The system rarely actually suffers "Regression"
  • 19. Continuous Condition Assertion 4 TDD, ATDD, Automated execution 4 All of these provide an ongoing safety net which might mean we don't need to revisit areas in the future (if we also tested them) 4 They don't mean that we have 'tested' them now
  • 20. Coverage - All coverage is Model Based 4 Code coverage based on source code model 4 What about requirements, system interfaces, states, flows? 4 Code coverage is a useful metric for TDD coverage 4 coverage models based on risk
  • 21. Tactical vs Strategic Automating Strategic does not mean 'strategy document'
  • 22. Automating as part of a Testing Strategy
  • 23. Automating Tactically vs Strategically What is Tactical? What is Strategic? Solve a problem Agreed & Understood Goals Short Term Long Term Change as necessary Slower to Change Your Time 'project' time
  • 24. Warning - sometimes tactics look like strategy 4 Use of Jenkins is not Continuous Integration 4 Cucumber/Specflow (Gherkin) != ATDD or BDD 4 Automated Deployments != Continuous Delivery 4 Containers != always good environment provision 4 Page Objects != always good system abstractions
  • 25. You know you are Automating strategically when... 4 Reduced Maintenance & Change 4 Everyone agrees why 4 No fighting for 'time' 4 It's not about roles 4 It gets done
  • 26. How do we automate? 4 not about "test automation" 4 it is about automating tasks 4 automate the assertions used to check that the stories are still 'done'
  • 27. Automate flows through the system - vary data - abstract the execution
  • 28. Automating Strategically with Abstractions see also "Domain Driven Design" "modeling the system in code" 4 abstractions are about modelling - people seem to be scared of having too many models
  • 29. No Abstractions - Web Testing Example
  • 30. @Test public void canCreateAToDoWithNoAbstraction(){ WebDriver driver = new FirefoxDriver(); driver.get("http://todomvc.com/architecture-examples/backbone/"); int originalNumberOfTodos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); WebElement createTodo = driver.findElement(By.id("new-todo")); createTodo.click(); createTodo.sendKeys("new task"); createTodo.sendKeys(Keys.ENTER); assertThat(driver.findElement(By.id("filters")).isDisplayed(), is(true)); int newToDos = driver.findElements( By.cssSelector("ul#todo-list li")).size(); assertThat(newToDos, greaterThan(originalNumberOfTodos)); }
  • 31. But there were Abstractions (Lots of them) 4 WebDriver - abstration of browser 4 FirefoxDriver - abstraction Firefox (e.g. no version) 4 WebElement - abstraction of a dom element 4 createToDo - variable - named for clarity 4 Locator Abstractions via methods e.g. findElement 4 Manipulation Abstractions .sendKeys 4 Locator Strategies By.id
  • 32. Using Abstractions - Same flow
  • 33. @Test public void canCreateAToDoWithAbstraction(){ TodoMVCUser user = new TodoMVCUser(driver, new TodoMVCSite()); user.opensApplication().and().createNewToDo("new task"); ApplicationPageFunctional page = new ApplicationPageFunctional(driver, new TodoMVCSite()); assertThat(page.getCountOfTodoDoItems(), is(1)); assertThat(page.isFooterVisible(), is(true)); }
  • 34. What Abstractions were there? 4 TodoMVCUser 4 User 4 Intent/Action Based 4 High Level 4 ApplicationPageFunctional 4 Structural 4 Models the rendering of the application page
  • 35. REST Test - No Abstractions
  • 37. But there were Abstractions 4 RESTAssured - given, when, then, expect, auth, etc. 4 RESTAssured is an abstraction layer 4 Environment abstractions i.e. TestEnvDefaults Lots of Abstractions But a lack of flexibility
  • 39. @Test public void aUserCanAuthenticateAndUseAPI(){ HttpMessageSender http = new HttpMessageSender( TestEnvDefaults.getURL()); http.basicAuth( TestEnvDefaults.getAdminUserName(), TestEnvDefaults.getAdminUserPassword()); Response response = http.getResponseFrom( TracksApiEndPoints.todos); Assert.assertEquals(200, response.getStatusCode()); }
  • 41. @Test public void aUserCanAuthenticateAndUseAPI(){ TodosApi api = new TodosApi( TestTestEnvDefaults.getURL(), TestEnvDefaults.getUser()); Response response = api.getTodos(); Assert.assertEquals(200, response.getStatusCode()); }
  • 43. Automate at the interfaces where you can interact with the system.
  • 44. Architecting to Support... - Testing - Support - Deployment - Automating - Monitoring - Devops - Releasing - etc.
  • 45. Abstractions support different types of testing 4 regular automated execution with assertions 4 creation and maintenance by many roles 4 exploratory testing 4 stress/performance testing (bot example) requires thread safe abstractions
  • 46. Good abstractions encourage creativity, they do not force compliance and restrict flexibility.
  • 47. Supports Law of Requisite Variety "only variety can destroy variety" - W. Ross Ashby "only variety can absorb variety" - Stafford Beer
  • 48. Frameworks can 'Destroy' variety 4 Frameworks force us to comply with their structure 4 or things get 'hard' 4 or we don't reap the benefits from the Framework 4 Some things are not possible 4 Some things never occur to you to do
  • 49. We have a lot of models 4 user intent model - what I want to achieve 4 user action model - how I do that 4 interface messaging model - how the system implements that 4 admin models, support models, GUI models
  • 50. And models overlap e.g. user can use the API or the GUI to do the same things
  • 51. When we don't do this 4 test code takes a long time to maintain 4 test code takes too long to write 4 test code is hard to understand 4 test code is brittle - "every time we change the app the tests break/ we have to change test code" 4 execution is flaky - intermittent test runs - "try running the tests again"
  • 52. Example: Tactical Approach on Agile projects 4 exploratory testing to get the story to done 4 create a tech debt backlog for 'missing' automated tests 4 @Test code is tactical and we can knock it up (not as good as production)
  • 53. Example: Strategic Approach on Agile Projects 4 automate assertion checking of acceptance criteria for "done" 4 ongoing execution of the assertions for the life of the story
  • 54. Example: Strategic Approach on Agile Projects implies... 4 maintained for the life of the story in the application 4 deleting the @Test code when no longer relevant 4 amending code structure to make relevant as stories change and evolve 4 @Test code is strategic asset (just like production code)
  • 55. Why labour the point? 4 "test automation" often means "testers do the automating" 4 testers may not program as well as programmers 4 testers may not know various programming patterns 4 when programmers see @Test code written by testers they often don't want to touch it or maintain it
  • 56. Move from Abstractions such as 'Programming' and 'Testing' to 'Developing'
  • 57. I say I'm a "Test Consultant" I'm really a "Software Development Consultant" Testing is Part of the Development process
  • 58. Summary 4 Automate Strategically 4 ongoing assertion checking automated in @Test code 4 Abstractions model the system in code 4 Write abstractions at multiple levels 4 Good abstractions can support exploratory testing 4 Write good code all the time
  • 59. Learn to "Be Evil" 4 www.eviltester.com 4 @eviltester 4 www.youtube.com/user/EviltesterVideos
  • 60. Learn About Alan Richardson 4 www.compendiumdev.co.uk 4 uk.linkedin.com/in/eviltester
  • 61. Follow 4 Linkedin - @eviltester 4 Twitter - @eviltester 4 Instagram - @eviltester 4 Facebook - @eviltester 4 Youtube - EvilTesterVideos 4 Pinterest - @eviltester 4 Github - @eviltester
  • 62. BIO Alan is a test consultant who enjoys testing at a technical level using techniques from psychotherapy and computer science. Alan is the author of the books "Dear Evil Tester", "Java For Testers" and "Automating and Testing a REST API". Alan's main website is compendiumdev.co.uk and he blogs at blog.eviltester.com (see also TesterHQ.com)