SlideShare a Scribd company logo
Automated testing
Aistė Stikliūtė @ Vilnius Girls Code 2015-06-17
Me
● Career in software testing
● Testing classes
● Me in the community
Today - Test automation
● Why
● What
● How (high level + examples)
○ UI (Selenium)
○ API (SpecFlow + RestSharp)
● TDD / BDD
Why automate testing?
Can testing be automated?
James Bach:
there’s no automated testing, there’s automated checking!
Does it really pay off?
● New / legacy system?
● Waterfall / Agile?
● How difficult to automate?
● Team’s discipline?
● Personal motivation?
● Continuous delivery?
Continuous delivery
software engineering approach -
keep producing valuable software
that can be
reliably released anytime
Continuous D. benefits
● Accelerated Time to Market
● Building the Right Product
● Improved Productivity and Efficiency
● Reliable Releases
● Improved Product Quality
● Improved Customer Satisfaction
Personal motivation
In between testing and development...
Domain expert
Enjoys coding
Problem solverProblem finder
Usability expert
Has technical skillsHacker
Automated test types
● Functional tests:
○ Unit tests
○ Integration tests
○ End-to-end tests
● Performance tests
● Security tests
● Usability
What tests can be automated?
* to certain extent!
What cannot / should not?
● The “first look”
● Functional suitability
● Some security tests
● Some operations tests
● Real user experience tests
● Very alternative scenarios (?)
Which are most important?
The ones you will use!
● My bet: some of the functional tests
● Unit tests - fastest, find fewest bugs
● End-to-end - slowest, find bugs
● Integration - in the middle
How to ....
automated tests?
Rule #1 - make them visible
● Dashboards
● Notifications
● Attract attention:
○ QAs
○ Developers
○ Management
● Each commit?
● Nightly?
● After deployment to different environment?
○ Even PROD (special suite)?
Rule #2 - run tests often
Look ASAP: are they green?
Rule #3 - keep them green
● Fix system / tests immediately
○ Unstable tests - (almost) worthless
■ Change / refactor tests
■ Maybe change the system?
■ If nothing else works - automate retrying
○ 1 test keeps failing - test suite (almost) worthless
■ Tmp commenting / ignoring may be OK
Rule #4 - include tests in DoD
● Feature not finished
until it has automated tests
● Automated tests - team’s responsibility
* DoD - Definition of Done
Rule #5 - automate bugfix tests
I’m baaack! :)
Coverage… ?
* Rodin's The Thinker
GUI / end-to-end tests with Selenium
Selenium
IDE vs. WebDriver
Script ←→ Browser ←→ Click, type, drag&drop, etc.
GUI / end-to-end ?
Selenium WebDriver
IWebDriver driver = new FirefoxDriver();
driver.Navigate().GoToUrl("http://www.google.com/");
IWebElement query = driver.FindElement(By.Name("q"));
query.SendKeys("Cheese");
query.Submit();
WebDriverWait wait = new WebDriverWait(driver, TimeSpan.
FromSeconds(10));
wait.Until( (d) => { return d.Title.ToLower().StartsWith
("cheese"); });
driver.Quit();
Page Object pattern
public class LoginPage {
public HomePage loginAs(String username, String password) {
// ... clever magic happens here
}
public LoginPage loginAsExpectingError(String username,
String password) {
// ... failed login here
}
public String getErrorMessage() {
// So we can verify that the correct error is shown
}
}
API tests with SpecFlow & RestSharp
What is REST API and why test it?
● Web architectural style with a set of constraints
● Web service APIs that adhere to the constraints - RESTful
Rest API: typically used HTTP methods
Resource GET POST PUT DELETE
Collection URI, such as
http://api.example.
com/books/
List
collection
members
Create
new entry
in the
collection
Replace the
entire
collection
Delete the
entire
collection
Element URI, such as
http://api.example.
com/books/book17
Retrieve
the member
of the
collection
Not
generally
used
Replace the
member of the
collection
Delete the
member of the
collection.
SpecFlow. Gherkin language
GIVEN book with ISBN “1-84356-028-3” is in the system
AND it’s available quantity is 9
WHEN I add a book with ISBN “1-84356-028-3”
THEN the book is successfully added to the list
AND available qty. for book with ISBN “1-84356-028-3” is 10
SpecFlow: scenario implementation
SpecFlow: running tests
Test / Business Driven Development
Test-first automation approach
TDD:
● Developer writes tests, then writes code until tests pass
BDD:
● PO / QA / team write tests
● Developer implements tests
● Developer writes code until tests pass
That’s it!
For starters :)

More Related Content

What's hot

How Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian KarlHow Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian Karl
SmartBear
 
"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl
TEST Huddle
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
Iakiv Kramarenko
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
Narayanan Palani
 
Being Lean Agile
Being Lean AgileBeing Lean Agile
Being Lean Agile
prakashmpujar
 
So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?
Steve Wells
 
Cypress workshop for JSFoo 2019
Cypress  workshop for JSFoo 2019Cypress  workshop for JSFoo 2019
Cypress workshop for JSFoo 2019
Biswajit Pattanayak
 
Why test automation projects are failing
Why test automation projects are failingWhy test automation projects are failing
Why test automation projects are failing
Igor Khrol
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
Applitools
 
Few minutes To better Code - Refactoring
Few minutes To better Code - RefactoringFew minutes To better Code - Refactoring
Few minutes To better Code - Refactoring
Diaa Al-Salehi
 
Architecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsArchitecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applications
Mikhail Vasylchenko
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
Agile Testing Alliance
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
Dave Haeffner
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
Meaghan Lewis
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
Foyzul Karim
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
Excella
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platform
Chamil Madusanka
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
Michael Yagudaev
 
Automated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and SpecflowAutomated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and Specflow
BizTalk360
 

What's hot (19)

How Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian KarlHow Spotify Does Test Automation - Kristian Karl
How Spotify Does Test Automation - Kristian Karl
 
"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl"Experiences Of Test Automation At Spotify" with Kristian Karl
"Experiences Of Test Automation At Spotify" with Kristian Karl
 
Automation is Easy! (python version)
Automation is Easy! (python version)Automation is Easy! (python version)
Automation is Easy! (python version)
 
Cypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests courseCypress test techniques cucumber bdd framework,tdd,api tests course
Cypress test techniques cucumber bdd framework,tdd,api tests course
 
Being Lean Agile
Being Lean AgileBeing Lean Agile
Being Lean Agile
 
So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?So we're going no-QA - how do we get the devs to do enough testing?
So we're going no-QA - how do we get the devs to do enough testing?
 
Cypress workshop for JSFoo 2019
Cypress  workshop for JSFoo 2019Cypress  workshop for JSFoo 2019
Cypress workshop for JSFoo 2019
 
Why test automation projects are failing
Why test automation projects are failingWhy test automation projects are failing
Why test automation projects are failing
 
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
[Webinar] Continuous Testing Done Right: Test Automation at the World's Leadi...
 
Few minutes To better Code - Refactoring
Few minutes To better Code - RefactoringFew minutes To better Code - Refactoring
Few minutes To better Code - Refactoring
 
Architecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applicationsArchitecture of automated test cases for legacy applications
Architecture of automated test cases for legacy applications
 
ATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot FrameworkATAGTR2017 Expanding test horizons with Robot Framework
ATAGTR2017 Expanding test horizons with Robot Framework
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Making cross browser tests beautiful
Making cross browser tests beautifulMaking cross browser tests beautiful
Making cross browser tests beautiful
 
Unit testing (workshop)
Unit testing (workshop)Unit testing (workshop)
Unit testing (workshop)
 
Working Effectively With Legacy Code
Working Effectively With Legacy CodeWorking Effectively With Legacy Code
Working Effectively With Legacy Code
 
Unit testing in Force.com platform
Unit testing in Force.com platformUnit testing in Force.com platform
Unit testing in Force.com platform
 
Automated testing in javascript
Automated testing in javascriptAutomated testing in javascript
Automated testing in javascript
 
Automated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and SpecflowAutomated Testing with Logic Apps and Specflow
Automated Testing with Logic Apps and Specflow
 

Similar to Automated testing

How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
Max Barrass
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
Alexandru Bolboaca
 
Test Automation
Test AutomationTest Automation
Test Automation
Rodrigo Paiva
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
Adam Doyle
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
JWORKS powered by Ordina
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
Xavi Hidalgo
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
Harvard Web Working Group
 
Wso2con test-automation
Wso2con test-automationWso2con test-automation
Wso2con test-automation
krishantha_samaraweera
 
Demise of test scripts rise of test ideas
Demise of test scripts rise of test ideasDemise of test scripts rise of test ideas
Demise of test scripts rise of test ideas
Richard Robinson
 
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile EnvironmentWSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2
 
Selenium done right
Selenium done rightSelenium done right
Selenium done right
Tal Landa
 
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Jacek Gebal
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
Justin Filip
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When Automating
Alan Richardson
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
Ford Prior
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
Yong Shean Chong
 
UPC Plone Testing Talk
UPC Plone Testing TalkUPC Plone Testing Talk
UPC Plone Testing Talk
Timo Stollenwerk
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
Abhijeet Vaikar
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
Sam Becker
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
Vishal Banthia
 

Similar to Automated testing (20)

How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...How to establish ways of working that allows shifting-left of the automation ...
How to establish ways of working that allows shifting-left of the automation ...
 
Usable Software Design
Usable Software DesignUsable Software Design
Usable Software Design
 
Test Automation
Test AutomationTest Automation
Test Automation
 
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflowMay 2021 Spark Testing ... or how to farm reputation on StackOverflow
May 2021 Spark Testing ... or how to farm reputation on StackOverflow
 
Integration testing - A&BP CC
Integration testing - A&BP CCIntegration testing - A&BP CC
Integration testing - A&BP CC
 
Unit Testing and TDD 2017
Unit Testing and TDD 2017Unit Testing and TDD 2017
Unit Testing and TDD 2017
 
Ui Testing with Ghost Inspector
Ui Testing with Ghost InspectorUi Testing with Ghost Inspector
Ui Testing with Ghost Inspector
 
Wso2con test-automation
Wso2con test-automationWso2con test-automation
Wso2con test-automation
 
Demise of test scripts rise of test ideas
Demise of test scripts rise of test ideasDemise of test scripts rise of test ideas
Demise of test scripts rise of test ideas
 
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile EnvironmentWSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
WSO2Con Asia 2014 - Effective Test Automation in an Agile Environment
 
Selenium done right
Selenium done rightSelenium done right
Selenium done right
 
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3Ukoug webinar - testing PLSQL APIs with utPLSQL v3
Ukoug webinar - testing PLSQL APIs with utPLSQL v3
 
Moodle Development Best Pracitces
Moodle Development Best PracitcesMoodle Development Best Pracitces
Moodle Development Best Pracitces
 
Lessons Learned When Automating
Lessons Learned When AutomatingLessons Learned When Automating
Lessons Learned When Automating
 
Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)Testing API's: Tools & Tips & Tricks (Oh My!)
Testing API's: Tools & Tips & Tricks (Oh My!)
 
Automated testing with Cypress
Automated testing with CypressAutomated testing with Cypress
Automated testing with Cypress
 
UPC Plone Testing Talk
UPC Plone Testing TalkUPC Plone Testing Talk
UPC Plone Testing Talk
 
Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)Unit testing (Exploring the other side as a tester)
Unit testing (Exploring the other side as a tester)
 
Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8Test all the things! Automated testing with Drupal 8
Test all the things! Automated testing with Drupal 8
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 

Recently uploaded

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
Claudio Di Ciccio
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”“I’m still / I’m still / Chaining from the Block”
“I’m still / I’m still / Chaining from the Block”
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

Automated testing

  • 1. Automated testing Aistė Stikliūtė @ Vilnius Girls Code 2015-06-17
  • 2. Me ● Career in software testing ● Testing classes ● Me in the community
  • 3. Today - Test automation ● Why ● What ● How (high level + examples) ○ UI (Selenium) ○ API (SpecFlow + RestSharp) ● TDD / BDD
  • 5. Can testing be automated? James Bach: there’s no automated testing, there’s automated checking!
  • 6. Does it really pay off? ● New / legacy system? ● Waterfall / Agile? ● How difficult to automate? ● Team’s discipline? ● Personal motivation? ● Continuous delivery?
  • 7. Continuous delivery software engineering approach - keep producing valuable software that can be reliably released anytime
  • 8. Continuous D. benefits ● Accelerated Time to Market ● Building the Right Product ● Improved Productivity and Efficiency ● Reliable Releases ● Improved Product Quality ● Improved Customer Satisfaction
  • 9. Personal motivation In between testing and development... Domain expert Enjoys coding Problem solverProblem finder Usability expert Has technical skillsHacker
  • 11. ● Functional tests: ○ Unit tests ○ Integration tests ○ End-to-end tests ● Performance tests ● Security tests ● Usability What tests can be automated? * to certain extent!
  • 12. What cannot / should not? ● The “first look” ● Functional suitability ● Some security tests ● Some operations tests ● Real user experience tests ● Very alternative scenarios (?)
  • 13. Which are most important? The ones you will use! ● My bet: some of the functional tests ● Unit tests - fastest, find fewest bugs ● End-to-end - slowest, find bugs ● Integration - in the middle
  • 15. Rule #1 - make them visible ● Dashboards ● Notifications ● Attract attention: ○ QAs ○ Developers ○ Management
  • 16. ● Each commit? ● Nightly? ● After deployment to different environment? ○ Even PROD (special suite)? Rule #2 - run tests often Look ASAP: are they green?
  • 17. Rule #3 - keep them green ● Fix system / tests immediately ○ Unstable tests - (almost) worthless ■ Change / refactor tests ■ Maybe change the system? ■ If nothing else works - automate retrying ○ 1 test keeps failing - test suite (almost) worthless ■ Tmp commenting / ignoring may be OK
  • 18. Rule #4 - include tests in DoD ● Feature not finished until it has automated tests ● Automated tests - team’s responsibility * DoD - Definition of Done
  • 19. Rule #5 - automate bugfix tests I’m baaack! :)
  • 20. Coverage… ? * Rodin's The Thinker
  • 21. GUI / end-to-end tests with Selenium
  • 22. Selenium IDE vs. WebDriver Script ←→ Browser ←→ Click, type, drag&drop, etc. GUI / end-to-end ?
  • 23. Selenium WebDriver IWebDriver driver = new FirefoxDriver(); driver.Navigate().GoToUrl("http://www.google.com/"); IWebElement query = driver.FindElement(By.Name("q")); query.SendKeys("Cheese"); query.Submit(); WebDriverWait wait = new WebDriverWait(driver, TimeSpan. FromSeconds(10)); wait.Until( (d) => { return d.Title.ToLower().StartsWith ("cheese"); }); driver.Quit();
  • 24. Page Object pattern public class LoginPage { public HomePage loginAs(String username, String password) { // ... clever magic happens here } public LoginPage loginAsExpectingError(String username, String password) { // ... failed login here } public String getErrorMessage() { // So we can verify that the correct error is shown } }
  • 25. API tests with SpecFlow & RestSharp
  • 26. What is REST API and why test it? ● Web architectural style with a set of constraints ● Web service APIs that adhere to the constraints - RESTful
  • 27. Rest API: typically used HTTP methods Resource GET POST PUT DELETE Collection URI, such as http://api.example. com/books/ List collection members Create new entry in the collection Replace the entire collection Delete the entire collection Element URI, such as http://api.example. com/books/book17 Retrieve the member of the collection Not generally used Replace the member of the collection Delete the member of the collection.
  • 28. SpecFlow. Gherkin language GIVEN book with ISBN “1-84356-028-3” is in the system AND it’s available quantity is 9 WHEN I add a book with ISBN “1-84356-028-3” THEN the book is successfully added to the list AND available qty. for book with ISBN “1-84356-028-3” is 10
  • 31. Test / Business Driven Development
  • 32. Test-first automation approach TDD: ● Developer writes tests, then writes code until tests pass BDD: ● PO / QA / team write tests ● Developer implements tests ● Developer writes code until tests pass