Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Testing strategies beyond TDD - PHPMad

Marabesi
March 27, 2019

Testing strategies beyond TDD - PHPMad

Testing is an important part of the software development life cycle, therefore it is neglected by developers. Often software testing is related to TDD only, though there are acceptance testing, integration testing, stress testing and so on.

Also, developers tend to think that to apply TDD is not possible in an ongoing project, the goal of this talk is to give an example of a strategy to getting started with software testing in an existing project.

TDD is an essential part of C.I and C.D, therefore sometimes a different approach is needed in order to get to the unit testing.

Talk topics
- Software testing definition
- The need to refactor, the change is a constant in software development
- TDD the context and definition
- Integration test and acceptance test
- Approaches to create a strategy for effective testing
- Choosing a test tool
- Refactoring definition
- The project example 1 - API and front end
- The project example 2 - monolith approach
- Challenges and lessons learned

Marabesi

March 27, 2019
Tweet

More Decks by Marabesi

Other Decks in Programming

Transcript

  1. Developer Testing in the IDE: Patterns, Beliefs, and Behavior Beller

    M. et al. Developer Testing in the IDE: Patterns, Beliefs, and Behavior. In IEEE Transactions on Software Engineering, p. 261 - 284 (2019)
  2. ‘’ Testing is intended to show that a program does

    what it is intended to do and to discover program defects before it is put into use. Sommerville Ian, Software Engineering (10th Edition). 2016. p. 227.
  3. ‘’ Professional testers must still perform investigative testing. R. Jeffries,

    G. Melnik, Guest Editors' Introduction: TDD--The Art of Fearless Programming. 2017, p. 24 - 30.
  4. ‘’ Automated user interface testing is placed at the top

    of the test automation pyramid because we want to do as little of it as possible. M. Cohn, SUCCEEDING WITH AGILE. 2010, p. 312.
  5. ‘’ Service-level testing is about testing the services of an

    application separately from its user interface. M. Cohn, SUCCEEDING WITH AGILE. 2010, p. 313.
  6. ‘’ Unit testing is the process of testing program components,

    such as methods or object classes. Individual functions or methods are the simplest type of component. Sommerville Ian, Software Engineering (10th Edition). 2016. p. 232.
  7. R. S. Pressman, B. R. Maxim, SOFTWARE ENGINEERING - A

    Practitioner's Approach. 2015, p. 470.
  8. ‘’ For some people integration testing means to test through

    the entire stack of your application connected to other applications within your system. Ham Vocke, The Practical Test Pyramid, 2018, https://martinfowler.com/articles/practical-test-pyramid.html
  9. 72: Taylor Otwell - Testing Laravel Applications 72: Taylor Otwell

    - Testing Laravel Applications, http://www.fullstackradio.com/72
  10. ‘’ Sometimes you'll hear the terms functional test or acceptance

    test for these kinds of tests. Sometimes people will tell you that functional and acceptance tests are different things. Sometimes the terms are conflated. Ham Vocke, The Practical Test Pyramid, 2018, https://martinfowler.com/articles/practical-test-pyramid.html
  11. ‘’ End-to-end tests (also called Broad Stack Tests) give you

    the biggest confidence when you need to decide if your software is working or not. Ham Vocke, The Practical Test Pyramid, 2018, https://martinfowler.com/articles/practical-test-pyramid.html
  12. ‘’ Now that we’ve written some acceptance tests, functional tests

    are almost the same, with one major difference: Functional tests don’t require a web server. Codeception, Functional testing, https://codeception.com/docs/04-FunctionalTests
  13. e2e Unit - Application - Classes - Methods - Events

    - Components Frontend Integration
  14. Acceptance Integration Unit - Classes - Methods - Events -

    Database - File system - External services Backend - Application
  15. ‘’ We drive development with automated tests, a style of

    development called Test-Driven Development (TDD). Beck Kent, Test-Driven Development By Example. 2002, p. 9.
  16. Often this is not the case 72: Taylor Otwell -

    Testing Laravel Applications, http://www.fullstackradio.com/72
  17. ‘’ Refactoring is the process of changing a software system

    in such a way that it does not alter the external behavior of the code yet improves its internal structure. M. Fowler, K. Beck, J. Brant, W. Opdyke, D. Roberts, Addison-Wesley Professional. 1999, p. 9.
  18. TDD != UNIT TEST When to not use TDD? Playing

    with new technology The goal is not clear
  19. TDD != UNIT TEST When to not use TDD? Playing

    with new technology The goal is not clear P.O.C
  20. PHPunit PHPUnit is a programmer-oriented testing framework for PHP. It

    is an instance of the xUnit architecture for unit testing frameworks. https://phpunit.de
  21. Codeception Codeception collects and shares best practices and solutions for

    testing PHP web applications. With a flexible set of included modules tests are easy to write, easy to use and easy to maintain. https://codeception.com