Location>code7788 >text

[Anti-Forgotten Notes] Testing Processes and Techniques

Popularity:66 ℃/2024-10-01 15:17:46

What testers should be thinking about

Being in the back-end myself, I abhor ambiguous requirements and inexplicable test cases, so sometimes I wonder what testers should be looking for. From their point of view, what do they care more about?

Recently, I had the opportunity to learn about it, so I organized and recorded it so that I could better understand the various things that happened in my work afterwards

customer-centric

This one is really important, so much so that it could be a direct headline

Really understand the requirements before you do the testing, and put the customer first in everything you do

Don't be misled by the "story".

First of all, to distinguish clearly between customer groups, clear their demands in the general direction of the difference, targeted to business analysis

It is worth noting thatSometimes the so-called "solution" given by the client is not the real need.

The so-called program is mostly seen to be conducted "storytelling"description, so analyze what the customer really wants (you can gradually clarify what the customer wants in a product through a comparative analysis of requirements)

stakeholder identification

When a client communicates requirements, there may be many different principals and leaders who will give many points of requirements from their own domain perspective

We need to do something about these "demand generator"Weighting

List by Type-Name-Description-Relevance-Impact to identify the requirements that the project team should really focus on.

For example, when discussing specific technical requirements programs, the marketing leader's comments can be slightly

And of course you need to document it all and confirm it further with a more relevant leader after the fact

requirements document

The requirements document is for the entire project team, please understand it well, write in human language, or if you can't, draw some diagrams, please!

agile development

The Value of Agile Development: Realizing Requirements in Steps and Understanding What Customers Want

Here belongs to the theoretical part of the measurement of the opening, mention it, remember it

Key Models of Agile Development

SCRUM

Three characters:

  • Product Owner (PO);
  • SCRUM master (SCRUM master, SM);
  • TeamTeam (DTeam);

Three outputs (documents):

  • Product List;
  • Iteration list;
  • Incremental list;

Five meetings:

  • Iterative Planning Session;
  • Daily Station Meeting;
  • (Test Cases) Review Session;
  • Review Session;
  • To-do list sorting sessions; (what issues and when)

Determine the type of project

Determine what type of project it is before starting it.iteration (math.) or incremental

Iterative life cycle

Analyze ---> Design prototype system ---> Build test ---> Deliver
       (Generate prototype) (Improve system)

For high complexity and frequent changes (where changes are frequently requested by interested parties and directly affect the final product)

Incremental life cycle

| Analyze |<-----|
Analyze |<| Design |<Build |<
| Build | | Repeat the process until the end of the project.
| Test | | Deliver | >|
| | Deliver | ----->|

Applies when the customer is willing to accept the delivery of semi-finished products first and accepts subsequent continuous improvements

The aim is to speed up delivery

Agile testing flowchart (brief)

"A one-page test plan" means that when writing a test plan, don't be long-winded, just one plan for one iteration.

Time is of the essence.

Agile testing requires "delivering a usable product", not "finding defects".

Agile Testing Quadrants

The four quadrants are in no particular order, and the main thing is to look at the needs of the current iteration and treat the right one

clarification

Q1

As shown in the figure, customers are not necessarily professional, the content they mention may have problems, to learn to "PUA" them, that is, to help customers know what they want!

Q2

Unit testing generally means doing white box testing to achieve the following points:

  • Statement overrides; (reducing useless code)
  • Judgmental coverage; (cover as many branches as possible)
  • Path coverage; (as a test supplement)

Principle: the time spent doing unit testing should not exceed the time spent writing code

Each unit test isfreestanding, only one dimension is tested per test

Therefore, prioritization is needed, and judging the importance of tasks can be done using theTeam VotingThe way in which the

Q3

Should all test cases be graded? Yes, in order to control risk during iteration delivery

What to do with a tight project schedule? Bymind mapRefinement of test points

Q4

The most important thing to do if you are going to do performance testing is:Determining whether to do performance testing

Test Methods

Division of equivalence classes (emphasis added)

move

step1: first based onpopularMethods to classify equivalence classes; (that is, to do it from intuition)

step2: add a new class to the equivalence class table for theEach equivalence class Separately specify auniqueNumbering;

step3: designanA new use case that makes it possible tomaximumOverride valid equivalence classes that have not yet been covered; (repeat this step until theAll valid equivalence classes are covered by use cases

step4: designannew use case so that it canCovering only oneInvalid equivalence class; (repeat this step until theAll invalid equivalence classes are covered by use cases

In short, it's all about finding what works (in small quantities) before what doesn't work

Be careful not to combine test cases and only consider the current situation

Exercises - Triangle Problems

Input three integers a, b, c, as the three sides of a triangle, now the program to determine the type of triangle formed by the three sides are equilateral triangle, isosceles triangle, general triangle (and in particular, right triangle), as well as not constitute a triangle. Now three integers a, b, and c are required to be entered, and the following conditions must be satisfied.
Condition 1 1≤a≤ 100 Condition 4 a<b+c
Condition 2 1≤b≤ 100 Condition 5 b<a+c
Condition 3 1≤c≤100 Condition 6 c<a+b

First perform an equivalence class division

  1. invalid equivalence class (math.)

    • All values with side lengths less than 1 (not satisfying conditions 1, 2, and 3).
    • Any value where one side is longer than 100 (conditions 1, 2, and 3 are not satisfied).
    • The sum of any two sides is less than the value of the third side (conditions 4, 5, and 6 are not satisfied).
  2. valid equivalence class (math.)

    • All values with edge lengths between 1 and 100 (satisfying conditions 1, 2, and 3).
    • The sum of any two sides is greater than the value of the third side (satisfying conditions 4, 5, and 6).
  3. Triangle type equivalence class

    • Equilateral triangle: a = b = c.
    • Isosceles triangle: a = b ≠ c or a = c ≠ b or b = c ≠ a.
    • General triangle: a ≠ b ≠ c and a + b > c, a + c > b, b + c > a.
    • Right triangle: a three-sided relationship that satisfies the Pythagorean Theorem, e.g. a² + b² = c² or b² + c² = a² or c² + a² = b².

test case

Based on the above equivalence classes, we can design the following test cases:

  1. Invalid Test Cases

    • Test Case 1: a = 0, b = 2, c = 3 (condition 1 is not satisfied).
    • Test Case 2: a = 101, b = 2, c = 3 (does not satisfy condition 1).
    • Test Case 3: a = 2, b = 3, c = 5 (condition 4 is not satisfied).
  2. Effective Test Cases

    • Test Case 4: a = 10, b = 10, c = 10 (equilateral triangle).
    • Test Case 5: a = 5, b = 5, c = 8 (isosceles triangle).
    • Test Case 6: a = 3, b = 4, c = 5 (general triangle).
    • Test Case 7: a = 3, b = 4, c = 6 (right triangles that satisfy the Pythagorean Theorem).
  3. Boundary value test cases

    • Test Case 8: a = 1, b = 1, c = 2 (boundary values, general triangle).
    • Test Case 9: a = 100, b = 100, c = 100 (boundary values, equilateral triangle).
    • Test Case 10: a = 1, b = 2, c = 100 (boundary values, general triangle).

These test cases cover a variety of possible input situations, including invalid inputs and various types of valid triangles. With these test cases, it is possible to verify that the program's judgment of the triangle type is correct.

boundary value method

summarize

orthogonal test method

Mostly used for compatibility testing

The essence is to obtain as many test cases as possible with good coverage by probabilistic means (using orthogonal tables for permutations).

Scenario method (basic)

summarize

What is a scene?

  • The elements that make up the scene are who, when, where and what dreams and how they are made
  • Scenes can be nested

What is the scenario method?

The scenario approach describes the function points or business processes of a software system through the use of "scenarios".

That is, simulate different scenarios for the requirements to cover all the functional points and business processes, so as to improve the testing efficiency and achieve good results of a method.

Applicable occasions?

For systems or functions that address clear business processes.

Scenario method composition

base flow+ alternative streams = scenario approach

Always extract the basic scene first

move

STEP1: Analyze the requirements and identify the basic flows and alternative flows of the software;

STEP2: Generate different scenarios based on the basic stream and the alternative streams;

STEP3: Design corresponding test cases for each scenario generated;

STEP4: Revisit the test cases to remove redundancies and design the test data;

decision-making process

summarize

cause and effect diagram

summarize