juan m. fonseca-sol s · ci & cd i before talking about web testing we should understand how...

36
Quickstart on web testing on 2019 Juan M. Fonseca-Sol´ ıs juan.fonsecasolis.github.com March 1, 2020 Juan M. Fonseca-Sol´ ıs A quickstart on web testing on 2019 March 1, 2020 1 / 36

Upload: others

Post on 17-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Quickstart on web testing on 2019

Juan M. Fonseca-Solıs

juan.fonsecasolis.github.com

March 1, 2020

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 1 / 36

Page 2: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Outline

Introduction

CI & CD

Manual testing experiencesFunctional testingNon-functional testing

Automated testing experiences

Conclusions

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 2 / 36

Page 3: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Why do we test web application?

I Some examples of software development in Costa Rica: webapplications, big data and embedded systems

I New trends for 2019 regarding web applications are [7, 8, 9]:I Progressive web appsI Single page applicationsI Chat botsI Blockchain

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 3 / 36

Page 4: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Scope of this presentation

By application: desktop, embedded, mobile, web (responsive,desktop)

Methodology: agile, cascade, XP

Market: Asia, Europe, US

Development cycle: legacy, new

Role: architect, analyst, automation engineer, designer,tester

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 4 / 36

Page 5: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

CI & CD

I Before talking about web testing we should understand howsoftware is released

I There are two extended practices:I Continuous integration (CI)I Continuous delivery (CD)

I Testing is performed at different levels on CI & CD as we willsee in short

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 5 / 36

Page 6: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

CI & CD

Continuous integration [1]: 1

I Is a development practice that requires developers to integratecode into a shared repository several times a day.

I Each check-in is then verified by an automated build, allowingteams to detect problems early. - Thoughworks

1Have you hear about Mr. hit n‘ run buildbreaker? https://youtu.be/fuPFz5deXOwJuan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 6 / 36

Page 7: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Continuous delivery (CD)

Continuous delivery [2]:

I CD focuses an organization on building a streamlined,automated software release process.

I The feedback loop revolves around delivery of software to theend user as quickly as possible. - Atlassian

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 7 / 36

Page 8: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Continuous delivery (CD) (cont.)

BuildUnit tests, code reviews

Dev.Functional tests

TestAcceptance tests

Beta/preprod/stageClient feedback

ProductionSanity check

Cost of bug fixing

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 8 / 36

Page 9: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Tools used in CI/CD (cont.)

Here is an example of a pipeline implemented in GO:

http://codingnirvana.github.io/pune-scala/pictures/go_pipelines.png

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 9 / 36

Page 10: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing

I As you might already know, testing can be classified in twocategories: manual and automated

I One complements the other:I We cannot ask a machine to test what a person can’t verify

itself!

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 10 / 36

Page 11: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing

I Some must-know concepts on manual testing are [4]:I TCs estimation techniquesI Testing levelsI Quality control vs. quality assuranceI Verify vs. validateI Test life cycle

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 11 / 36

Page 12: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing (cont.)

I Test case estimation techniques [4]:I Boundary valuesI Equivalent classesI Cause-effect diagramsI Transition diagram (finite state machine)

I No one will ask you to use them, but everyone would be madif you don’t find the bugs!

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 12 / 36

Page 13: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing (cont.)

I The art of software testing:I Chapter 4: Test-Case Design (p. 35-69)

I Boundary value analysis (p. 46)I Equivalent classesI Cause-effect diagrams (p. 50)

I http://barbie.uta.edu/~mehra/Book1_The%20Art%20of%

20Software%20Testing.pdf

I Requirements-Based Testing- Cause-Effect Graphing:I http://barbie.uta.edu/~mehra/59_RBT_Cause-Effect_

Graphing2.pdf

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 13 / 36

Page 14: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing (cont.)

You should also know about test case management systems(TCMS), which allow to:

I Maintain test cases better than using a spreadsheet

I Log test runs

I Create test reports in a visually appealing way

I Calculate quality metrics (like the number of bugs found perTC)

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 14 / 36

Page 15: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing (cont.)

Here is an example of a TCMS called Testrails:

https://marketplace-cdn.atlassian.com/files/images/e9a091f7-2f37-4956-870c-558f4ac3efba.png

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 15 / 36

Page 16: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Manual testing (cont.)

I Now let’s talk about different kinds of manual testing:I Web responsive testingI Accessibility testingI Performance testingI Security testingI A/B testingI (to mention a few...)

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 16 / 36

Page 17: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Web responsive testing

I Purpose: to render the same webpage in different devicesI Must-know concepts:

I Responsive designI XHTML, RHTML, HTML

I Tools:I Vyzor, Reflector / AirserverI Charles Proxy, FiddlerI Browser stack

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 17 / 36

Page 18: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Web responsive testing (cont.)

Test is performed at least in three formats:

https://www.thewire.ca/media/blumbergs-hero.png

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 18 / 36

Page 19: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Accessibility testing

I Purpose: make content available for a broader range of usersI Must-know concepts [5, 6]:

I POUR principle (perceivable, observable, understandable,robust)

I WCAG 2.0 guidelinesI Web Aria

I Tools:I Paciello toolbar, Sortsite, WebaimI Google Accessibility toolbarI Screen readers (VoiceOver, Jaws)I Windows high contrast mode

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 19 / 36

Page 20: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Accessibility testing (cont.)

https:

//developers.google.com/web/fundamentals/accessibility/semantics-aria/imgs/aria-describedby.jpg

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 20 / 36

Page 21: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Accessibility testing (cont.)

https://s3-us-west-2.amazonaws.com/uw-s3-cdn/wp-content/uploads/sites/54/2014/10/06144407/

ColourContrastChecker.png

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 21 / 36

Page 22: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Performance testing

I Purpose: know how the webpage behaves on different workloads.2

I Must-know concepts:I Stress, load, performance, soakI Ramp-up period, throughput

I Tools:I JMeter, Blazemeter, Taurus

2Here is an example of why this is useful: https://juanfonsecasolis.github.io/blog/JFonseca.suavizadoTraficoServidorWeb.html.Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 22 / 36

Page 24: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Security testing

I Purpose: protect data integrity and privacyI Must-know concepts:

I OWASP top 10I XSS, SQL injection, LDAP injection

I Tools:I BURPI Kali Linux and tools installed

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 24 / 36

Page 25: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Security testing (cont.)

Here are some examples of a fixed data leaking and XSS:

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 25 / 36

Page 26: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

A/B testing

I Purpose: increase revenue by getting feedback from usersI Must-know concepts [3]:

I Hypothesis testing (null, alternative)I Is the revenue increased with any variation?

I Statistical significanceI T-student, normal distribution

I Tools:I OptimizelyI MixpanelI Splunk InsightsI Adobe Omniture

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 26 / 36

Page 27: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

A/B testing (cont.)

https://images.ctfassets.net/zw48pl1isxmc/3lRlyAZISsG0iWyiO8Ug84/

7a32f963dd0fdc3ccb4483fc56aa55d2/ab-testing-optimizely-2.png

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 27 / 36

Page 28: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Automated testing

I To finish, a quick overview on automated testing:I UI test automationI Web service test automation

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 28 / 36

Page 29: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Pros and cons of automation

I Pros:I Input combinations can be tested exhaustivelyI Repetitive and time consuming flows can be automated

I Cons:I Periodic maintenance on test suites can be time consuming

and complexI Tests are only able to detect bugs for which they were

programmed to

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 29 / 36

Page 30: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

UI test automation

I Purpose: catch bugs by reproducing a flow in the webbrowsers

I Must-know concepts:I Page-object modelI Page factoryI Locators (XPath, CS)I Coding standards (.Net, Java)

I Tools:I Selenium (Webdriver, IDE, grid)I Cucumber

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 30 / 36

Page 31: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Web service test automation

I Purpose: catch bugs by checking data and operationsI Must-know concepts:

I SOAP, RESTFulI XML, JSON

I Tools:I JUnitI PostmanI SOAP UII RestAssureI CURL, JQ

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 31 / 36

Page 32: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

Conclusions

I CD/CI allows to serve software more frequently and with lessrisk.

I Proper functional testing requires knowledge on test caseestimation techniques and TCMS.

I Non-functional testing covers areas like: responsive design,accessibility, performance, security, and A/B testing.

I Test automation makes testing activities easier, but at cost ofmaintenance and visibility.

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 32 / 36

Page 33: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

References I

Thoughworks.Continuous integration.https:

//www.thoughtworks.com/continuous-integration.

AttlasianContinuous Delivery Principles.https://www.atlassian.com/continuous-delivery/

principles.

OptimizelyA/B Testing.https://www.optimizely.com/optimization-glossary/

ab-testing/.

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 33 / 36

Page 34: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

References II

Glenford J. Myers, Corey Sandler, Tom BadgettThe art of software testing.ISBN: 978-1-118-03196-4, Wiley, November 2011.

WebAIMIntroduction to Web Accessibility.https://webaim.org/intro/.

W3C Web Accessibility Initiative (WAI)WAI-ARIA Overview.https://www.w3.org/WAI/standards-guidelines/aria/.

Uriah Solution Pvt. Ltd.Top 10 Web Development Trends in 2019.https://www.uriahsolution.com/blog/

website-development-trends-2018/.

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 34 / 36

Page 35: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

References III

Noemi BalogTop 8 Web Development Trends of 2019.https://www.codingdojo.com/blog/

web-development-trends-of-2019.

Jake Prins, Free Code Camp 2019Interesting Web Technologies to follow in 2019.https://medium.freecodecamp.org/

trending-web-technologies-to-follow-in-2019.

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 35 / 36

Page 36: Juan M. Fonseca-Sol s · CI & CD I Before talking about web testing we should understand how software is released I There are two extended practices: I Continuous integration (CI)

License

This work is licensed under aCreative Commons “Attribution-NonCommercial-NoDerivs 3.0 Un-ported” license.

Click on the license icon to get more information.

Juan M. Fonseca-Solıs A quickstart on web testing on 2019 March 1, 2020 36 / 36