Overview about A B C
(Arrange Act Assert, BESOD Techniques, Continuous Integration Ready)
BESOD- Be a Super Developer (Acronym of key test design techniques)
Test Design Techniques in Detail (Boundary Value analysis, State transition diagram and others)
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽❤️🧑🏻 89...
ABC of developer test
1. AGENDA
Part1 – COVER THE BASICS (20 MINS)
•Overview about A B C
• (Arrange Act Assert, BESOD Techniques, Continuous Integration Ready)
•BESOD- Be a Super Developer (Acronym of key test design techniques)
• Test Design Techniques in Detail (Boundary Value analysis, State transition diagram and
others)
• (Examples from the existing improvement will be covered as code snippets)
•Effective usage of Parametrization approach with examples of code snippet
•Mocking the external behaviour through effective mocking
•(Examples will be covered)
•Running the Unit Test in the Build Pipeline
•Bring change at the Organization Level
• Clean Code culture and Developer Mindset
• Continuous Refactoring
• Governance and tracking at leadership level
Part1 – PRESENT EXAMPLES OF IMPLEMENTATION OF THE BESOD TECHNIQUES (20 MINS)
2. ABC OF DEVELOPER TEST
• AAA- Arrange, Act, Assert: Arrange all necessary preconditions and inputs. Act on the object or
method under test. Assert that the expected results have occurred. Use the right Unit test
framework, test suite organization and Test naming convention
• Behaviors Driven - Focus on key Functionality or Scenarios which the production code is
handling.
• BESOD- Parametrize Test (Assertion) based on any of these techniques- Boundary Value,
Equivalence Partitioning, State Transition, Orthogonal Array, Decision tree
• Continuous Integration Ready: Ensure that the Unit test is continuously running the CI system.
AAA
Behavior/
BESOD
Continuous
Integration
Ready
A B C
3. 3
UNIT TEST – STRUCTURE
• Arrange Act Assert
• Give When Then
• Setup Exercise Verify Teardown
Arrange Act Assert
• AAA is common standard for writing the unit test cases.
• Arrange: It means Arrange everything to setup the unit test case, like creating the objects, initializing/mocking data
etc..
• Act: Act on your unit test case, meaning execute necessary functionality/methods that needs to be unit tested.
• Assert: This part verifies the functionality/method that we are unit testing is giving the result as per expectation.
5. 5
STATE TRANSITION TESTING
• State Transition testing, is a technique, in which outputs are triggered by changes to the input
conditions or changes to 'state' of the system.
• In other words, tests are designed to execute valid and invalid state transitions.
Using state transition testing, we pick test cases from an
application where we need to test different system transitions. We
can apply this when an application gives a different output for the
same input, depending on what has happened in the earlier state.
6. 6
REQUIREMENT BACKGROUND
Feature : Global navigation statellite system S Antenna Status Update
Feature Description :
Reading and updating Antenna Status from Gnss Chip.
Configuring Antenna Pin Values and deriving Antenna Status based on
the truth table.
Supporting 2 & 3 Pin Logic for Customer Specific Projects.
UNIT TESTING EXAMPLES
7. 7
SCOPE
PIN15:
pinSCD
PIN14
pinOCD
PIN13
pinSwitch
STATUS
0 0 0 OUTOFSERVICE
0 0 1 OUTOFSERVICE
0 1 0 OUTOFSERVICE
0 1 1 SHORT_GND
1 0 0 SHORT_BATT
1 0 1 OPEN
1 1 0 NORMAL
1 1 1 NORMAL
PIN15
pinSCD
PIN13
pinSwitch
STATUS
0 0 OUTOFSERVICE
0 1 SHORT_GND
1 0 SHORT_BATT
1 1 OUTOFSERVICE
Truth Table :
3 Pin 2 Pin
UNIT TESTING EXAMPLES