• Bootcamp (9)
    • ๐Ÿ“ฑ 236 - 992 - 3846

      ๐Ÿ“ง jxjwilliam@gmail.com

    • Version: โ€๐Ÿš€ 1.1.0
  • 4 Testing

    BootcampBestitconsulting/Bootcamp2020-12-17


    (1) Testing Overview

    Quality is TEAM work

    • Requirement Analysis:

      3 Amigo session, Sprint grooming, Sprint planning

    • Risk analysis
    • CI/CD pipeline
    • Testing Pyramid
    • Early code delivery - early feedback

    ๐Ÿช• Ideal Testing Timeline in SPRINT

    test1

    (2) Unit Testing

    ๐Ÿช• Functional vs non-functional testing

    Functional testing refers to activities that verify a specific action or function of the code. These are usually found in the code requirements documentation, although some development methodologies work from use cases or user stories. Functional tests tend to answer the question of โ€œcan the user do thisโ€ or โ€œdoes this particular feature work.โ€

    Non-functional testing refers to aspects of the software that may not be related to a specific function or user action, such as scalability or other performance, behavior under certain constraints, or security. Testing will determine the breaking point, the point at which extremes of scalability or performance leads to unstable execution. Non-functional requirements tend to be those that reflect the quality of the product, particularly in the context of the suitability perspective of its users.

    Functional Testing

    • Approaches: Regression or Domain
    • Levels: Smoke or Critical
    • Types: Compatibility (ๅ…ผๅฎนๆ€ง) or Usability
    • Disciplines: Manual or Automation

    Non-functional Testing

    • Baseline, Compliance (ๅˆ่ง„)
    • Documentation
    • Endurance (่€ๅŠ›)
    • L10n (Localization) and I18n
    • Performance and Load
    • Recovery
    • Resilience (ๅผนๆ€ง)
    • Security
    • Scalability
    • Stress
    • Usability
    • Volume

    Unit Testing

    • Test functionality of small application elements
    • Written by developers
    • Easy to run in IDE
    • Take a few minutes or seconds to run
    • Easily integrated with CI

    test2.png

    Unit Testing - Principles

    • F: Fast
    • I: Independent
    • R: Repeatable
    • S: Self-validating
    • T: Timely

    ๐Ÿช• Unit Test Code Coverage

    80%, 95, 70%?

    • Code coverage is not the primary goal for unit testing. It doesnโ€™t guarantee quality.
    • Continuous integration can help to avoid decreases in code coverage.

    tdd.png

    (3) Test Automation

    ๐Ÿช• Development First Mode

    ๐Ÿช• Testing First Mode

    TDD - Test-Driven Development: A technique where the unit test is designed first, then the feature is developed.

    ๐Ÿช• Test Automationโ€™s Place In CI

    • Delivery Team
    • Versison Control
    • Unit Test
    • Integration Test
    • Acceptance Test

    1 most popular and important metrics in Test Automation:

    ROI Return of investment

    test3.png

    • xUnit
    • TDD - Test-Driven Development

      this approach works when the test is developed first, then the feature goes.

    • ATDD - Acceptance test-driven approach
    • Keyword-Driven
    • BDD - behavior-driven framework is 1 successor of TDD.

      Instead of defining the test itself, we focus on feature behavior.

    • Data-driven

    test4.png

    (4) Testing of Non-Functional Requirements

    • Peformance
    • Security
    • Reliability
    • Maintainability
    • Usability
    • Supportability

    ๐Ÿช• Performance

    • Response time
    • Capacity
    • Stability
    • Scalability

    test5.png

    ๐Ÿช• Engagement Planning

    • Requirements analysis
    • Scenarios creation + Defining load model
    • Choosing load tools
    • Developing test scripts

    Manual Testing

    ๐Ÿช• Pros

    • Lower short-term cost
    • Each execution is slightly different - has certain randomness
    • Easily adaptable to environment changes
    • Flexible - allows flow changes
    • Can be supported by tools
    • Can detect sligth changes that tools cannot as not looking into them

    ๐Ÿช• Cons

    • Time-consuming
    • Certain task are hard to perform manually
    • Can be repetitive and boring
    • Less accurate than automated tests

    Automation Testing

    ๐Ÿช• Pros

    • Cost effective in long term
    • Repeatable
    • Quick execution - quick feedback
    • Leaves time fro more creative testing activities
    • Parallel execution

    ๐Ÿช• Cons

    • Relies heavily on tools
    • Tools have a cost even if they are open source
    • Tools have limitations
    • Automation is not suited for every testing type
    • Effective implementation requires expertise

    Suitable for: Regression, Load testing, Repeated execution

    What is security tesing?

    • Static Application Secuirty Testing (SAST)

    Focus on analysis of the application source code for security vulnerabilities

    • Dynamic Application Security Testing (DAST)

    Focus on simulating attacks against running application

    • Interactive Application Security Testing (IAST)

    Combination of SAST and DAST

    OWASP TOP 10 (2017)

    The Open Web Application Security Project

    Top 10 Critical Web Application Security Risks:

    1. Injection
    2. Broken Authentication (่ฎค่ฏ)
    3. Sensitive Data Exposure (ๆ›้œฒ)
    4. XML External Entities (XXE)
    5. Broken Access Control
    6. Security Misconfiguration
    7. Cross-Site Scripting (XSS)
    8. Insecure Deserialization (ๅๅบๅˆ—ๅŒ–)
    9. Using Components with Known Vulnerabilities (ๆผๆดž)
    10. Insufficient Logging & Monitoring

    test6.png

    test7.png

    (4)

    Frontend vs. Backend Testing

    ๐Ÿช• Frontend

    • Visible, tangible (ๆ˜Ž็™ฝ็š„, ๆ˜Ž็กฎ็š„)
    • Requires human perception to detect subtle errors
    • Auto tests can be more fragile
    • Compatibility testing with different Browsers, OS, Devices and Connection Speeds

    Tests: Functional, GUI, Usability, Accessibility, etc

    ๐Ÿช• Backend

    • Communication and data is less visible
    • Auto tests are more stable
    • May require customized tools
    • Component interdependency

    Tests: Functional, Integration, Performance, API, etc.

    Mobile Testing

    • Multiple Mobile Devices
    • Device Fragmentation & Various S Platforms
    • Different Mobile App Types
    • Numerous Test Interfaces
    • Variety of Testing Tools

    ๐Ÿช• Mobile Testing - Parameters

    • Services
    • Applications
    • Application frameworks
    • Operating systems
    • Platforms
    • Devices
    • aggregators (่šๅˆ)
    • Networks
    • Operators

    Moreโ€ฆ

    • SonarQube

      SonarQube is an open-source platform developed by SonarSource for continuous inspection of code quality to perform automatic reviews with static analysis of code to detect bugs, code smells, and security vulnerabilities on 20+ programming languages.

    • Fortify

      propriety tool to help do Static Code Analysis from a security point of view.

    • JSHint

      a static code analysis tool for JS used at Mozilla, Facebook, wikipedia, Twitter etc.

    Smoke Testing

    Smoke Testing, also known as โ€œBuild Verification Testingโ€, is a type of software testing that comprises of a non-exhaustive set of tests that aim at ensuring that thte most important functions work. The result of this testing is used to decide if a build is stable enough to proceed with further testing.

    Smoke tests can be functional tests or unit tests. Functional tests exercise the complete program with various inputs. Unit tests exercise individual functions, subroutines, or object methods.

    In the DevOps paradigm, use of a BVT step is one hallmark (็‰น็‚น) of the continuous integration (CI) maturity stage.

    Regression testing

    Regression testing is the process of testing changes to computer programs to make sure that the older programming still works with the new changes. Regression testing is a normal part of the program development process and, in larger companies, is done by code testing specialists.

    ๐Ÿช• penetration (ๆธ—้€) test

    Vulnerability Assessment