UI Builder
Test Automation
Proposal
Mihai-Cristian Fratila
Software Engineer in Test & Scrum Master
Phoenix team
Topics
1. Why we need test automation?
2. Types of tests that we need
3. Test architecture for each type
4. Tools proposal for each type
5. Integrating CI tools & VC systems
6. Demo
How it all started?
• Action item from Sprint 18.4 SP1 retrospective
Reasons why we need
automated tests
• UI builder app gets bigger by every sprint
• App in early phase -> a lot of regression issues
• Tests performed manually by now
• Automated tests will provide faster feedback while
developing features
• Automated tests should be started while the app is in a
early phase and progress alongside the development
process
Examples of regression bugs
Level of testing
API Testing
• Pros: Cons:
• Allows user to create collections. - cannot integrate with Git
• Allows user to semi-automate tests. - cannot integrate with Jenkins
• Gives feedback quick.
• Allows user to create env variables.
• Allows user to create tests without hardcoding values .
DEMO
API Testing
• Java library that provides domain specific language for writing powerful and
maintainable REST API tests.
• Pros:
• Removes the need for writing code to set up HTTP connection, send a
request and receive and parse the response
• Supports given/when/then test notation, which make your tests human
readable.
• Since it is a Java library, it can be integrated very well with Jenkins.
Framework architecture
Rest Assured Test -
Folders and UI Objects
CRUD operations
Maven
Build automation tool
Test NG
Testing framework and
reporting for Java
Tests Architecture
Rest Assured Test -
Folders and UI Objects
CRUD operations
Tests Architecture
HTTP helper
methods
Data
payload
Resources
(URLs)
General Utils
Rest Assured Test -
Folders and UI Objects
CRUD operations
DEMO
Level of testing
UI Testing
• e2e testing framework for (Angular) js applications.
• Wrapper around Selenium WebdriverJS and Selenium Server
• Open source, hosted on Github.
• Records tests running in a real browser.
• Interacts with page elements as a real user would.
Alternative: - Selenium Webdriver
Why Protractor ?
• Whole development team is using Javascript as main language for frontend -> Protractor is
developed in Javascript.
• Has a lot of new locators strategies and functions. Allows users to create custom locators.
(show example with custom locator for shadow down elements)
• Automatic waiting, can execute the next step in your test, the moment the webpage finishes
pending tasks.
• Can run on both real and headless browsers.
• Can be integrated with CI tools.
How it works?
• A test involves 3 processes: the test script, the server and the browser.
• Selenium Server takes care of interpreting commands from the test script and forwards them
to one of the browsers, through WebDriver Wire Protocol interpreted by the browser’s driver.
Framework architecture
Npm
package manager for
JavaScript
Jasmine
BDD testing framework
and reporting for JS
Protractor test - e2e flow
Tests architecture
Protractor test - e2e flow
Tests architecture
Protractor test - e2e flow
jsonData
Page
Objects
Utils
Configuration
file
Package.json
DEMO
Level of testing
Integration
• Each framework to be part of a separate repo on
Git.
• Each repo from Git will be linked to a Jenkins job.
• REST Api tests should be used as a sanity tests.
• UI Tests should be used as regression tests.
DEMO
What’s next
• Talk to Balaji and propose this test architecture.
What’s next?
• Owner of the test process is the entire Phoenix
team.
• We work agile and have full control over the entire
software development process.
• US creation -> PI planning -> Backlog grooming
-> Sprint planning -> Sprint execution
(development & testing) -> Track progress ->
Present report at SOS -> Improve process
(Retrospective)
What’s next?
• Keep checking new tools that will help us more:
• newman
• Protractor-image-comparisson
• Analyse integration of Protractor with Typescript
Q&A

Test automation proposal

  • 1.
    UI Builder Test Automation Proposal Mihai-CristianFratila Software Engineer in Test & Scrum Master Phoenix team
  • 2.
    Topics 1. Why weneed test automation? 2. Types of tests that we need 3. Test architecture for each type 4. Tools proposal for each type 5. Integrating CI tools & VC systems 6. Demo
  • 3.
    How it allstarted? • Action item from Sprint 18.4 SP1 retrospective
  • 4.
    Reasons why weneed automated tests • UI builder app gets bigger by every sprint • App in early phase -> a lot of regression issues • Tests performed manually by now • Automated tests will provide faster feedback while developing features • Automated tests should be started while the app is in a early phase and progress alongside the development process
  • 5.
  • 6.
  • 7.
    API Testing • Pros:Cons: • Allows user to create collections. - cannot integrate with Git • Allows user to semi-automate tests. - cannot integrate with Jenkins • Gives feedback quick. • Allows user to create env variables. • Allows user to create tests without hardcoding values .
  • 8.
  • 9.
    API Testing • Javalibrary that provides domain specific language for writing powerful and maintainable REST API tests. • Pros: • Removes the need for writing code to set up HTTP connection, send a request and receive and parse the response • Supports given/when/then test notation, which make your tests human readable. • Since it is a Java library, it can be integrated very well with Jenkins.
  • 10.
    Framework architecture Rest AssuredTest - Folders and UI Objects CRUD operations Maven Build automation tool Test NG Testing framework and reporting for Java
  • 11.
    Tests Architecture Rest AssuredTest - Folders and UI Objects CRUD operations
  • 12.
    Tests Architecture HTTP helper methods Data payload Resources (URLs) GeneralUtils Rest Assured Test - Folders and UI Objects CRUD operations
  • 13.
  • 14.
  • 15.
    UI Testing • e2etesting framework for (Angular) js applications. • Wrapper around Selenium WebdriverJS and Selenium Server • Open source, hosted on Github. • Records tests running in a real browser. • Interacts with page elements as a real user would. Alternative: - Selenium Webdriver
  • 16.
    Why Protractor ? •Whole development team is using Javascript as main language for frontend -> Protractor is developed in Javascript. • Has a lot of new locators strategies and functions. Allows users to create custom locators. (show example with custom locator for shadow down elements) • Automatic waiting, can execute the next step in your test, the moment the webpage finishes pending tasks. • Can run on both real and headless browsers. • Can be integrated with CI tools.
  • 17.
    How it works? •A test involves 3 processes: the test script, the server and the browser. • Selenium Server takes care of interpreting commands from the test script and forwards them to one of the browsers, through WebDriver Wire Protocol interpreted by the browser’s driver.
  • 18.
    Framework architecture Npm package managerfor JavaScript Jasmine BDD testing framework and reporting for JS Protractor test - e2e flow
  • 19.
  • 20.
    Tests architecture Protractor test- e2e flow jsonData Page Objects Utils Configuration file Package.json
  • 21.
  • 22.
  • 23.
    Integration • Each frameworkto be part of a separate repo on Git. • Each repo from Git will be linked to a Jenkins job. • REST Api tests should be used as a sanity tests. • UI Tests should be used as regression tests.
  • 24.
  • 25.
    What’s next • Talkto Balaji and propose this test architecture.
  • 26.
    What’s next? • Ownerof the test process is the entire Phoenix team. • We work agile and have full control over the entire software development process. • US creation -> PI planning -> Backlog grooming -> Sprint planning -> Sprint execution (development & testing) -> Track progress -> Present report at SOS -> Improve process (Retrospective)
  • 27.
    What’s next? • Keepchecking new tools that will help us more: • newman • Protractor-image-comparisson • Analyse integration of Protractor with Typescript
  • 28.