automation for developers
DESCRIPTION
Automation has bing a demanding field with the growth of the aoganization. This presentation includes mind mapping series of slides in path of quality asspect for developersTRANSCRIPT
![Page 1: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/1.jpg)
Automation For Developers
![Page 2: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/2.jpg)
● We are super developers and we don't make mistakes.
● I never do changes to my code.
● I am the life time owner of my code.
● I am the only person who use each component I build.
● We have telepathic.
● My code runs on each platform
○ Its platform vendor’s responsibility to make
platforms unique.
![Page 3: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/3.jpg)
![Page 4: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/4.jpg)
What do you think ??????
![Page 5: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/5.jpg)
Who write the code ??
Who works with your code??
![Page 6: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/6.jpg)
●
●
●
●
●
![Page 7: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/7.jpg)
“Quality is free, but only to thosewho are willing to pay heavily for it.”
- Lister, Demarco: “Peopleware”
![Page 8: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/8.jpg)
●
●
●
●
●
●
![Page 9: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/9.jpg)
Testing Good Bad And Ugly
![Page 10: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/10.jpg)
●
●
●
●
●
●
![Page 11: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/11.jpg)
●
●●
●
●
![Page 12: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/12.jpg)
●
●
●
●
![Page 13: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/13.jpg)
●
●
●
●
●
●
![Page 14: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/14.jpg)
Understanding - Cost of test Wrong way
![Page 15: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/15.jpg)
Understanding - Cost of test Right way
![Page 16: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/16.jpg)
Basic Understanding - Unit Test
● Focused on testing behavior of a
particular class, module or method.
● Smallest part of the application.
● Fast (less than 0.1 second per test)
● No external implementation
dependencies
(filesystem, database, web services, etc.). All
dependencies are faked for the test context.
● Can easily be parallelized, since each test is atomic
![Page 17: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/17.jpg)
Basic Understanding - Integration Test
● Focused on verifying the integration
of one or more components together.
● May have external dependencies.
● A test that takes longer than a unit
Test should
Integration Tests - with in WSO2 ● Executes on product pack created by build.
● Not depending on other product environments.
● Independent.
● Lightweight.
● Covers only scenarios related to features on individual product.
![Page 18: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/18.jpg)
●●
○○○○○○○
●M = E − N + 2P,
where
E = the number of edges of the graph.
N = the number of nodes of the graph.
P = the number of Connected Components
●fi
![Page 19: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/19.jpg)
●
●
●●●●
![Page 20: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/20.jpg)
Jacoco /EclEmma coverage report
Emma coverage report
![Page 21: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/21.jpg)
● Platform scenarios.
● Integration scenarios.
● UI scenarios.
● Real world use cases.
● Performance and Security scenarios.
● Patches provided.
![Page 22: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/22.jpg)
How tests really looks like
Platform - Platform Tests
Cross Platform Tests
Product - Integration Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Product - Integration Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Product - Integration Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Product - Integration Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
Component - Unit Tests
![Page 23: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/23.jpg)
![Page 24: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/24.jpg)
What got better and bigger
● Lightweight test execution engine.
● More focus on platform wide scenarios.
● More user friendly configuration management.
● Ability to extend TestNG based listener implementation
○ Ability to plugin custom servers like Tomcat, CXF ,ActiveMQ,
Apache FTP and more.
● Ability to come up with your automation story.
![Page 25: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/25.jpg)
Organization Test Automation Framework modules
Engine
Extensions Admin Service API
Core - Utilities
Automation Test
Core Servers External Tools
Extensibility Modules
Configuration
![Page 26: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/26.jpg)
Overall Architecture
Configuration
Support Modules Test Automation Framework
Test
Build platform -Maven
Test Trigger- Surefire
Testing Framework - TestNg
Test Suite
platform
Automation.xml
Coverage
Instrumentation.txt
Pluggable Extensions
TestNg Listener Extension Modules
Test Tooling Extensions
Server Management
Tenant Management
Engine
TestNg Listener Extensions
Configuration Management
Context Management
Extensible module handling
Admin Service API
Reusable core utils
filter.txt
Test Configurations
TestNg.xmlTestNg.xmlTestNg.xml
![Page 27: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/27.jpg)
Flexibilities Provided
● Manage several products inside single test.
● Manage users in several product domains.
● Deployment of artifacts for different products under
different users.
● Configured admin service clients as test oriented API.
● Retrieving test environment configurations easily.
● Running same test in both local and Stratos environments.
● Reporting TestNg and surefire reports for all your tests.
● Tooling support of Selenium and Jmeter.
![Page 28: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/28.jpg)
Technologies for Automation
Test Framework Build Systems
Code Coverage
Extensibility Support
UI Automation
![Page 29: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/29.jpg)
● Like JUnit but not JUnit
● Annotation based Architecture
● Test Grouping
● Extensibility features
○ Listeners
○ Bean Shell
○ Annotation Transformers
● Easiness of managing Test cases.
● Failed test execution (Straight and easy)
![Page 30: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/30.jpg)
●
●
●
○ Trigger out TestNg.
○ Control TestNG flow (Through Surefire TestNg Utils)
○ Generate reports. (HTML, XML and emailable report)
![Page 31: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/31.jpg)
Execution Started@BeforeSuite
@BeforeTest
@AfterTest
@AfterSuite
Execution Closed
@BeforeClass
@BeforeGroups
@BeforeMethod
@AfterMethod
@AfterGroups
@AfterClass
![Page 32: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/32.jpg)
● Listeners are interfaces allows to modify TestNG's
behavior.
● Listeners are binned to a testNg execution.
● Listeners implement the interface org.testng.ITestListener○ IExecutionListener
■ Triggers at start and end of any execution.■ ISuiteListener.
○ ISuiteListener■ Triggers at suite start and end.ITestListener■ Triggers at Test start, Finish, Failure, Skip and partial failure.
● Reporters implement the interface org.testng.IReporter ○ Notified when all the suites have been run by TestNG. ○ The IReporter instance receives a summary of entire test run
![Page 33: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/33.jpg)
●
○ Offline instrumentation
○ On fly instrumentation
●
●
○ LOC coverage
○ Class coverage
○ cyclomatic complexity
![Page 34: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/34.jpg)
●
●
Common Extensions
Automation.xml
Test Suite
Test Suite Extensions
Test Suite Utilities
Test classes
Automation Framework Engine
![Page 35: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/35.jpg)
●
●
●
●
![Page 36: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/36.jpg)
● Includes all utility classes that can play supportive role inside a test.
○ Ex :-
■ Axis2 client.
■ Wire message monitor.
■ Custom server startup scenarios (Axis2, Tomcat, ActiveMQ).
■ Concurrency test scenarios.
■ Rest Clients.
● Provides common methodology for all development
teams and Automation team to maintain a set
of supportive classes without changing the Core.
![Page 37: Automation for developers](https://reader033.vdocument.in/reader033/viewer/2022052321/555e57c3d8b42a8e4c8b50ee/html5/thumbnails/37.jpg)
Questions?
Happy Automation !!