Trust Your Pipeline - Automatically Testing and End-to-End Java Application

13
Trust Your Pipeline: Automatically Testing an End-to-End Java Application Bruno Souza | @brjavaman Elias Nogueira | @eliasnogueira

Transcript of Trust Your Pipeline - Automatically Testing and End-to-End Java Application

Trust Your Pipeline: Automatically Testing an End-to-End Java ApplicationBruno Souza | @brjavaman

Elias Nogueira | @eliasnogueira

Different Test Levels

Unit Tests

Component Tests

Integration Test

API Test

WebMobile

UI

Static Analysis

Code coverage

Stubs

Mocks

Services

UI Tests

Visual Regression Test

Test Pyramid – Focus on Automated Testing

Different Test LevelsTest Pyramid – Focus on Automated Testing

Unit Tests

Component Tests

Integration Test

API Test

WebMobile

UI

Machines for web execution

Devices for mobile executions

Servers ”mid” tests

Continuous Delivery

Development

QAOperationsDevOps

Automated Buildand DeployAutomated

Provisioning

ContinuousFeedback

AutomatedTesting

Strategy focus on a Test Pipeline

UNITTEST

INTEGRATION TEST

SERVICETEST

ACCEPTANCE TEST

FUNCTIONAL TEST

MOCK

SMOKEWEB

MOBILE

NON FUNCTIONAL TESTS

SCREENSHOTS – LOGS – REPORT – DATA MANAGEMENT - PARAMETERIZED

PARALLEL EXECUTION

SMOKE

CONTRACT

FUNCTIONAL

ACCEPTANCE

REST ASSURED+

JAVA SPARK (mock)

RESTSELENIUM

WEBDRIVER

WEBAPPIUM

withEMULATOR

MOBILE

REST ASSURED for test an REST endpointSELENIUM WEBDRIVER for a Web Test (functional and acceptance)

APPIUM for Mobile Test (functional and acceptance)

Tool boxTools for think about test out-of-the-box

Now it’s time to see the tools in action

Example

REST Assured

RestAssured test exampleSending a GET with id 1 (given) and the assert

the response/results (then)

Easy DSL to automating REST services that’s use Given-When-Then syntax

https://github.com/jayway/rest-assured

Selenium WebDriverEasy DSL to automating REST services that’s use Given-When-Then syntax

https://seleniumhq.org

Selenium automated testing exampleComplete example with navigation, localization, manipulation and synchronization

AppiumTool for automated testing on native Android, iOS or Hybrid mobile apps

https://appium.io

Example with a pre-installed appComplete example targeting an Android platform

Applied PipelineWe gonna show this magic!

SERVICETEST

ACCEPTANCE TEST

FUNCTIONAL TEST

MOCKWEB

MOBILE

SMOKE

FUNCTIONAL

Thank youhttps://github.com/eliasnogueira/ test-automation-javaone-2017

http://code4.life