SlideShare a Scribd company logo
Modern Software Testing and Formal Verification
Techniques
Day 1
Sergey Staroletov
Polzunov Altai State Technical University,
Lenin avenue 46, Barnaul, 656038, Russia
Email: serg soft@mail.ru
June 25, 2019
1 / 65
QA in the modern software world
Quality Assurance – is a process to satisfy of a desired level of the
quality for system under implementation or maintenance
Testing – is a process to check the behavior of the system with
respect to given specifications (assumptions, tests)
Formal Verification – is a process to proof of the correspondence
of a model of the system to given formal requirements
NB: Level can be too high or tool low, specifications can be incorrect or
incomplete, models can be wrong.
So: QA is an area where no one does not guarantee nothing.
We are able to improve but are not able to guarantee.
2 / 65
Unsafe, uncomfortable, erroneous...but can be used
3 / 65
A few words about testing...
The main goal of testing – show possible inconsistence between
expected and actual behaviors.
In other words: to find bugs
Do not prove that we have no bugs
Just to find a counterexample = a bug.
4 / 65
General Testing Problem
The problem of testing is answering the question: whether it is
possible for any program to determine does it execute a given
algorithm or has errors and does not execute a given algorithm?
Assume that the program works in a simple single-threading
environment, has a set of control states, and after each step of
transition to a next state, the values of the variables are printed. If
(after the completion of the program) the output is exactly equals
to the expected, the program is recognized as a correct one. The
problem of testing is whether it is possible to do such a test for any
program according only to its description.
5 / 65
General Testing Problem is undecidable over current
CPU architectures
A program can be counted as a G¨odel number
The GTP is equals to a formula translation problem
Test(N) =⇒ Result
It is equals to the Turing Machine Halting Problem
So it is undecidable.
The Principle of Methodological Diversity: To satisfy given level or
quality we should propose as much testing methods as possible;
every particular method can have a chance to find a whole nother
bug.
6 / 65
V-Model of Developing and Testing
7 / 65
MDD: Model-Driven Development
8 / 65
MDD in Double-V-Model of Developing and Testing
9 / 65
Double-V-Model of Developing and Testing
10 / 65
Triple-V-Model of Developing and Testing and
Verification
11 / 65
Triple-V-Model of Developing and Testing and
Verification and Tools
12 / 65
Testing levels
The level of code =⇒ Static analysers
Unit level =⇒ Unit testing
The level of Functionality =⇒ Automated scripts, Manual testing
by testers according to plans and specifications
13 / 65
Manual Testing / Work of a tester / QA-engineer
14 / 65
Static analysers
No models to write by the users!
Additional warnings in an IDE
Check common smells and security weaknesses
Integration into Continuous Integration / Continuous Delivery
processes
SonarQube
PVS Studio
cppcheck
...
15 / 65
SonarQube
16 / 65
PVS Studio
17 / 65
Manual Testing / Work of a tester / QA-engineer
18 / 65
Unit testing
The approach was created by introducing the JUnit framework
Implemented by Erich Gamma (one of the GoF)
It was coded during a flight from the USA to Europe
We have an expected value
We run a method a get an actual value
We check the correspondence between the actual and the
expected values.
19 / 65
Unit testing – usual case
20 / 65
Unit testing in a glance
Tests are written by the programmers
They create tests to checks methods without running the whole
app
One Assert per test! Test writer should create a lot of tests for the
different usage cases of a method, to satisfy the coverage of
internal ifs, cycles, work with different values of parameters
Tests are descriptable: they specify how the class should be used
Unit testing can be used at the first stages of learning new
languages, new libraries, new frameworks
The best way to create tests not for their own code, but for the
other teammember’s code.
21 / 65
Normal Unit-Testing
22 / 65
Why not doing like this?
23 / 65
TDD
Test
Driven
Development
Proposed by Kent Beck
24 / 65
TDD
Write a test
Write a MINIMAL code to pass the test (or refactor existing)
COMMIT the changes
Think about a new test
At the each study of the developing we have a working code that
corresponds to the tests
Maximum test coverage
Developers are lazy and do not think about complex
implementations
The process is tracked by VCS
Software can be demonstrated to a customer or business by a
request.
25 / 65
TDD demo
26 / 65
TDD demo : calculator
27 / 65
TDD demo : calculator
28 / 65
TDD demo : calculator
29 / 65
TDD demo : calculator
30 / 65
TDD demo : calculator
31 / 65
TDD demo : calculator
32 / 65
TDD demo : calculator
33 / 65
TDD demo : calculator
34 / 65
TDD demo : calculator
35 / 65
TDD demo : calculator
36 / 65
TDD demo : calculator
37 / 65
TDD demo : calculator
38 / 65
TDD problems
Developer thinks too much about the code
Customer is not involved into the process
Managers think that the process is costly
Small amount of companies use it because lack of experience
how to setup this process
39 / 65
BDD
Behavior
Driven
Development
Firstly it was implemented in Cucumber framework
40 / 65
BDD process
1 Write specification in almost natural language (it could be done by
the customer!)
2 Link the specification with the code
3 Write code of testing calls, asserts
4 Execute the specification
5 If it fails, write / refactor code as in TDD
41 / 65
BDD demo : calculator
Specification in Gherkin language
42 / 65
BDD demo : calculator
43 / 65
BDD demo : calculator
44 / 65
BDD demo : calculator
45 / 65
BDD demo : calculator
46 / 65
BDD demo : calculator
47 / 65
BDD demo : calculator
48 / 65
BDD demo : calculator
49 / 65
BDD demo : calculator
50 / 65
BDD demo : calculator
51 / 65
BDD demo : calculator
52 / 65
My research on TDD and BDD
Building a process of trustworthy software developing based on
BDD and ontology approaches with further formal verification.
PSSV 2018 Proceedings
An Application of Test-Driven Development Methodology into the
Process of Hardware Creation (a View from a Software
Perspective). PSSV 2019 Proceedings
An IDE (IDEA) plugin to create list of tasks and steps and
generate tests and code. Bachelor’s diploma work of V.V.
Vorobyeva.
53 / 65
Introduction to MBT
And if we do not want to create unit tests by hand?
We do not want to support the tests : code is changed too fast
Our system is too complex
Behavior can be described as an automaton
So it is goal to use Model-Based Testing approach
54 / 65
Introduction to MBT
Microsoft Spec Explorer
Integrates into MS VS 2012
Based on Abstract State Machines
Cord Script to specify a behavior
Code in C# for implementations under test
55 / 65
Login demo
56 / 65
Login demo
57 / 65
Login demo
58 / 65
Login demo
59 / 65
Login demo
60 / 65
Login demo
61 / 65
Login demo
62 / 65
Login demo
63 / 65
Login demo
64 / 65
Learn more about all we have touched today
Want to think about testing and verification in a warm atmosphere?
65 / 65

More Related Content

What's hot

Top 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual TestersTop 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual Testers
Sarah Elson
 
Software testing live project training
Software testing live project trainingSoftware testing live project training
Software testing live project training
TOPS Technologies
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
Vivek V
 
Fresher interview question for software testing (QA) manual + basic automation
Fresher interview question for software testing (QA) manual + basic automationFresher interview question for software testing (QA) manual + basic automation
Fresher interview question for software testing (QA) manual + basic automation
Rakesh Hansalia
 
Qa mockup interview for automation testing
Qa mockup interview for automation testingQa mockup interview for automation testing
Qa mockup interview for automation testing
KadharBashaJ
 
Types of testing
Types of testingTypes of testing
Types of testing
Sonam Agarwal
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
Mansi Palav
 
Manual testing interview questions and answers
Manual testing interview questions and answersManual testing interview questions and answers
Manual testing interview questions and answers
Testbytes
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Ankit Prajapati
 
Manual testing
Manual testingManual testing
Manual testing
vigneshasromio
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
Vishwanath KC
 
Integrate Test Activities in Agile
Integrate Test Activities in AgileIntegrate Test Activities in Agile
Integrate Test Activities in Agile
TEST Huddle
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
Trimantra Software Solutions
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
TechTalks
 
Testing a GPS application | Testbytes
Testing a GPS application | TestbytesTesting a GPS application | Testbytes
Testing a GPS application | Testbytes
Testbytes
 
Test-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical StudyTest-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical Study
Delft University of Technology
 
ISTQB Eğitim Sunumu
ISTQB Eğitim SunumuISTQB Eğitim Sunumu
ISTQB Eğitim Sunumu
Mesut Güneş
 
Software Testing - Day Two
Software Testing - Day TwoSoftware Testing - Day Two
Software Testing - Day Two
Govardhan Reddy
 

What's hot (19)

Top 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual TestersTop 15 Interview Questions for Manual Testers
Top 15 Interview Questions for Manual Testers
 
Software testing live project training
Software testing live project trainingSoftware testing live project training
Software testing live project training
 
Testing concept definition
Testing concept definitionTesting concept definition
Testing concept definition
 
Fresher interview question for software testing (QA) manual + basic automation
Fresher interview question for software testing (QA) manual + basic automationFresher interview question for software testing (QA) manual + basic automation
Fresher interview question for software testing (QA) manual + basic automation
 
Qa mockup interview for automation testing
Qa mockup interview for automation testingQa mockup interview for automation testing
Qa mockup interview for automation testing
 
Types of testing
Types of testingTypes of testing
Types of testing
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 
Manual testing interview questions and answers
Manual testing interview questions and answersManual testing interview questions and answers
Manual testing interview questions and answers
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
 
Manual testing
Manual testingManual testing
Manual testing
 
Automation frameworks
Automation frameworksAutomation frameworks
Automation frameworks
 
Integrate Test Activities in Agile
Integrate Test Activities in AgileIntegrate Test Activities in Agile
Integrate Test Activities in Agile
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
 
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
Tech talks annual 2015 izzet mustafayev_performance testing - the way to make...
 
Testing a GPS application | Testbytes
Testing a GPS application | TestbytesTesting a GPS application | Testbytes
Testing a GPS application | Testbytes
 
Test-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical StudyTest-Driven Code Review: An Empirical Study
Test-Driven Code Review: An Empirical Study
 
ISTQB Eğitim Sunumu
ISTQB Eğitim SunumuISTQB Eğitim Sunumu
ISTQB Eğitim Sunumu
 
Software Testing - Day Two
Software Testing - Day TwoSoftware Testing - Day Two
Software Testing - Day Two
 

Similar to Staroletov testing TDD BDD MBT

A Research Study on importance of Testing and Quality Assurance in Software D...
A Research Study on importance of Testing and Quality Assurance in Software D...A Research Study on importance of Testing and Quality Assurance in Software D...
A Research Study on importance of Testing and Quality Assurance in Software D...
Sehrish Asif
 
Software Testing interview - Q&A and tips
Software Testing interview - Q&A and tipsSoftware Testing interview - Q&A and tips
Software Testing interview - Q&A and tips
Pankaj Dubey
 
stm f.pdf
stm f.pdfstm f.pdf
stm f.pdf
HarshNagda5
 
Software testing
Software testingSoftware testing
Software testing
Abrianto Nugraha
 
Software Testing - Online Guide
Software Testing - Online GuideSoftware Testing - Online Guide
Software Testing - Online Guide
bigspire
 
Gcs day1
Gcs day1Gcs day1
Gcs day1
Sriram Angajala
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
Sophia Girls' College(Autonomous), Ajmer
 
International Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJSInternational Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJS
hildredzr1di
 
Software Testing
Software Testing Software Testing
Software Testing
CHANDAN CHATURVEDI
 
Aim (A).pptx
Aim (A).pptxAim (A).pptx
Aim (A).pptx
14941
 
Software testing
Software testing   Software testing
Software testing
Ravindranath Tagore
 
Qa analyst training
Qa analyst training Qa analyst training
Qa analyst training
Dinesh Pokhrel
 
STM-UNIT-1.pptx
STM-UNIT-1.pptxSTM-UNIT-1.pptx
STM-UNIT-1.pptx
nischal55
 
Software testing
Software testingSoftware testing
Software testing
Rtr Sasi Tharan
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development process
Gen Aloys Ochola Badde
 
Software testing methodologies to watch out in 2020
Software testing methodologies to watch out in 2020Software testing methodologies to watch out in 2020
Software testing methodologies to watch out in 2020
Concetto Labs
 
Software testing
Software testingSoftware testing
Software testing
Nitin Dhanuka
 
Software test proposal
Software test proposalSoftware test proposal
Software test proposal
ManikandanRamanujam
 
Software testing2
Software testing2Software testing2
Software testing2
suneeth kumar
 
Software testing
Software testingSoftware testing
Software testing
Rakshitha Raviprakash
 

Similar to Staroletov testing TDD BDD MBT (20)

A Research Study on importance of Testing and Quality Assurance in Software D...
A Research Study on importance of Testing and Quality Assurance in Software D...A Research Study on importance of Testing and Quality Assurance in Software D...
A Research Study on importance of Testing and Quality Assurance in Software D...
 
Software Testing interview - Q&A and tips
Software Testing interview - Q&A and tipsSoftware Testing interview - Q&A and tips
Software Testing interview - Q&A and tips
 
stm f.pdf
stm f.pdfstm f.pdf
stm f.pdf
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing - Online Guide
Software Testing - Online GuideSoftware Testing - Online Guide
Software Testing - Online Guide
 
Gcs day1
Gcs day1Gcs day1
Gcs day1
 
Software testing strategies
Software testing strategiesSoftware testing strategies
Software testing strategies
 
International Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJSInternational Journal of Soft Computing and Engineering (IJS
International Journal of Soft Computing and Engineering (IJS
 
Software Testing
Software Testing Software Testing
Software Testing
 
Aim (A).pptx
Aim (A).pptxAim (A).pptx
Aim (A).pptx
 
Software testing
Software testing   Software testing
Software testing
 
Qa analyst training
Qa analyst training Qa analyst training
Qa analyst training
 
STM-UNIT-1.pptx
STM-UNIT-1.pptxSTM-UNIT-1.pptx
STM-UNIT-1.pptx
 
Software testing
Software testingSoftware testing
Software testing
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development process
 
Software testing methodologies to watch out in 2020
Software testing methodologies to watch out in 2020Software testing methodologies to watch out in 2020
Software testing methodologies to watch out in 2020
 
Software testing
Software testingSoftware testing
Software testing
 
Software test proposal
Software test proposalSoftware test proposal
Software test proposal
 
Software testing2
Software testing2Software testing2
Software testing2
 
Software testing
Software testingSoftware testing
Software testing
 

More from Sergey Staroletov

Distributed Systems Presentation for Business informatics students (Staroletov)
Distributed Systems Presentation for Business informatics students (Staroletov)Distributed Systems Presentation for Business informatics students (Staroletov)
Distributed Systems Presentation for Business informatics students (Staroletov)
Sergey Staroletov
 
Теория языков программирования некоторые слайды к лекциям
Теория языков программирования некоторые слайды к лекциямТеория языков программирования некоторые слайды к лекциям
Теория языков программирования некоторые слайды к лекциям
Sergey Staroletov
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systems
Sergey Staroletov
 
Staroletov MBC (Model Based Checking)
Staroletov MBC (Model Based Checking)Staroletov MBC (Model Based Checking)
Staroletov MBC (Model Based Checking)
Sergey Staroletov
 
An Application of Test-Driven Development Methodology into the Process of Ha...
 An Application of Test-Driven Development Methodology into the Process of Ha... An Application of Test-Driven Development Methodology into the Process of Ha...
An Application of Test-Driven Development Methodology into the Process of Ha...
Sergey Staroletov
 
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
Sergey Staroletov
 
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Sergey Staroletov
 
Cameroun (Francophone day)
Cameroun (Francophone day)Cameroun (Francophone day)
Cameroun (Francophone day)
Sergey Staroletov
 

More from Sergey Staroletov (8)

Distributed Systems Presentation for Business informatics students (Staroletov)
Distributed Systems Presentation for Business informatics students (Staroletov)Distributed Systems Presentation for Business informatics students (Staroletov)
Distributed Systems Presentation for Business informatics students (Staroletov)
 
Теория языков программирования некоторые слайды к лекциям
Теория языков программирования некоторые слайды к лекциямТеория языков программирования некоторые слайды к лекциям
Теория языков программирования некоторые слайды к лекциям
 
Staroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systemsStaroletov Design by Contract, verification of Cyber-physical systems
Staroletov Design by Contract, verification of Cyber-physical systems
 
Staroletov MBC (Model Based Checking)
Staroletov MBC (Model Based Checking)Staroletov MBC (Model Based Checking)
Staroletov MBC (Model Based Checking)
 
An Application of Test-Driven Development Methodology into the Process of Ha...
 An Application of Test-Driven Development Methodology into the Process of Ha... An Application of Test-Driven Development Methodology into the Process of Ha...
An Application of Test-Driven Development Methodology into the Process of Ha...
 
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
Towards a Probabilistic Extension to Non-Deterministic Transitions in Model-B...
 
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
Applying Model Checking Approach with Floating Point Arithmetic for Verificat...
 
Cameroun (Francophone day)
Cameroun (Francophone day)Cameroun (Francophone day)
Cameroun (Francophone day)
 

Recently uploaded

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
Gerardo Pardo-Castellote
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
Remote DBA Services
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Neo4j
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 

Recently uploaded (20)

Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
DDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systemsDDS-Security 1.2 - What's New? Stronger security for long-running systems
DDS-Security 1.2 - What's New? Stronger security for long-running systems
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Oracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptxOracle Database 19c New Features for DBAs and Developers.pptx
Oracle Database 19c New Features for DBAs and Developers.pptx
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Atelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissancesAtelier - Innover avec l’IA Générative et les graphes de connaissances
Atelier - Innover avec l’IA Générative et les graphes de connaissances
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 

Staroletov testing TDD BDD MBT

  • 1. Modern Software Testing and Formal Verification Techniques Day 1 Sergey Staroletov Polzunov Altai State Technical University, Lenin avenue 46, Barnaul, 656038, Russia Email: serg soft@mail.ru June 25, 2019 1 / 65
  • 2. QA in the modern software world Quality Assurance – is a process to satisfy of a desired level of the quality for system under implementation or maintenance Testing – is a process to check the behavior of the system with respect to given specifications (assumptions, tests) Formal Verification – is a process to proof of the correspondence of a model of the system to given formal requirements NB: Level can be too high or tool low, specifications can be incorrect or incomplete, models can be wrong. So: QA is an area where no one does not guarantee nothing. We are able to improve but are not able to guarantee. 2 / 65
  • 4. A few words about testing... The main goal of testing – show possible inconsistence between expected and actual behaviors. In other words: to find bugs Do not prove that we have no bugs Just to find a counterexample = a bug. 4 / 65
  • 5. General Testing Problem The problem of testing is answering the question: whether it is possible for any program to determine does it execute a given algorithm or has errors and does not execute a given algorithm? Assume that the program works in a simple single-threading environment, has a set of control states, and after each step of transition to a next state, the values of the variables are printed. If (after the completion of the program) the output is exactly equals to the expected, the program is recognized as a correct one. The problem of testing is whether it is possible to do such a test for any program according only to its description. 5 / 65
  • 6. General Testing Problem is undecidable over current CPU architectures A program can be counted as a G¨odel number The GTP is equals to a formula translation problem Test(N) =⇒ Result It is equals to the Turing Machine Halting Problem So it is undecidable. The Principle of Methodological Diversity: To satisfy given level or quality we should propose as much testing methods as possible; every particular method can have a chance to find a whole nother bug. 6 / 65
  • 7. V-Model of Developing and Testing 7 / 65
  • 9. MDD in Double-V-Model of Developing and Testing 9 / 65
  • 10. Double-V-Model of Developing and Testing 10 / 65
  • 11. Triple-V-Model of Developing and Testing and Verification 11 / 65
  • 12. Triple-V-Model of Developing and Testing and Verification and Tools 12 / 65
  • 13. Testing levels The level of code =⇒ Static analysers Unit level =⇒ Unit testing The level of Functionality =⇒ Automated scripts, Manual testing by testers according to plans and specifications 13 / 65
  • 14. Manual Testing / Work of a tester / QA-engineer 14 / 65
  • 15. Static analysers No models to write by the users! Additional warnings in an IDE Check common smells and security weaknesses Integration into Continuous Integration / Continuous Delivery processes SonarQube PVS Studio cppcheck ... 15 / 65
  • 18. Manual Testing / Work of a tester / QA-engineer 18 / 65
  • 19. Unit testing The approach was created by introducing the JUnit framework Implemented by Erich Gamma (one of the GoF) It was coded during a flight from the USA to Europe We have an expected value We run a method a get an actual value We check the correspondence between the actual and the expected values. 19 / 65
  • 20. Unit testing – usual case 20 / 65
  • 21. Unit testing in a glance Tests are written by the programmers They create tests to checks methods without running the whole app One Assert per test! Test writer should create a lot of tests for the different usage cases of a method, to satisfy the coverage of internal ifs, cycles, work with different values of parameters Tests are descriptable: they specify how the class should be used Unit testing can be used at the first stages of learning new languages, new libraries, new frameworks The best way to create tests not for their own code, but for the other teammember’s code. 21 / 65
  • 23. Why not doing like this? 23 / 65
  • 25. TDD Write a test Write a MINIMAL code to pass the test (or refactor existing) COMMIT the changes Think about a new test At the each study of the developing we have a working code that corresponds to the tests Maximum test coverage Developers are lazy and do not think about complex implementations The process is tracked by VCS Software can be demonstrated to a customer or business by a request. 25 / 65
  • 27. TDD demo : calculator 27 / 65
  • 28. TDD demo : calculator 28 / 65
  • 29. TDD demo : calculator 29 / 65
  • 30. TDD demo : calculator 30 / 65
  • 31. TDD demo : calculator 31 / 65
  • 32. TDD demo : calculator 32 / 65
  • 33. TDD demo : calculator 33 / 65
  • 34. TDD demo : calculator 34 / 65
  • 35. TDD demo : calculator 35 / 65
  • 36. TDD demo : calculator 36 / 65
  • 37. TDD demo : calculator 37 / 65
  • 38. TDD demo : calculator 38 / 65
  • 39. TDD problems Developer thinks too much about the code Customer is not involved into the process Managers think that the process is costly Small amount of companies use it because lack of experience how to setup this process 39 / 65
  • 40. BDD Behavior Driven Development Firstly it was implemented in Cucumber framework 40 / 65
  • 41. BDD process 1 Write specification in almost natural language (it could be done by the customer!) 2 Link the specification with the code 3 Write code of testing calls, asserts 4 Execute the specification 5 If it fails, write / refactor code as in TDD 41 / 65
  • 42. BDD demo : calculator Specification in Gherkin language 42 / 65
  • 43. BDD demo : calculator 43 / 65
  • 44. BDD demo : calculator 44 / 65
  • 45. BDD demo : calculator 45 / 65
  • 46. BDD demo : calculator 46 / 65
  • 47. BDD demo : calculator 47 / 65
  • 48. BDD demo : calculator 48 / 65
  • 49. BDD demo : calculator 49 / 65
  • 50. BDD demo : calculator 50 / 65
  • 51. BDD demo : calculator 51 / 65
  • 52. BDD demo : calculator 52 / 65
  • 53. My research on TDD and BDD Building a process of trustworthy software developing based on BDD and ontology approaches with further formal verification. PSSV 2018 Proceedings An Application of Test-Driven Development Methodology into the Process of Hardware Creation (a View from a Software Perspective). PSSV 2019 Proceedings An IDE (IDEA) plugin to create list of tasks and steps and generate tests and code. Bachelor’s diploma work of V.V. Vorobyeva. 53 / 65
  • 54. Introduction to MBT And if we do not want to create unit tests by hand? We do not want to support the tests : code is changed too fast Our system is too complex Behavior can be described as an automaton So it is goal to use Model-Based Testing approach 54 / 65
  • 55. Introduction to MBT Microsoft Spec Explorer Integrates into MS VS 2012 Based on Abstract State Machines Cord Script to specify a behavior Code in C# for implementations under test 55 / 65
  • 65. Learn more about all we have touched today Want to think about testing and verification in a warm atmosphere? 65 / 65