Knowledge points of software testers (2020.09.10)

Back to back test

Back-to-back testing means that the same function is tested by two groups of people without communicating with each other. It is an effective means to ensure the quality of the test.

Program compilation

The process of program compilation includes lexical analysis, grammatical analysis and semantic analysis.

The lexical analysis reads the source program character by character from left to right, and recognizes each word symbol. Common lexical errors include input keyword errors, etc .;

Syntax analysis is based on lexical analysis to decompose the sequence of word symbols into various types, such as "program", "sentence", "expression" and other grammatical units; semantic analysis is to examine the source program for semantic errors, which is the code generation stage Collect type information. Common errors at this stage include infinite loops and a divisor of 0.

Lexical errors and grammatical errors can be checked out when the program is compiled, while dynamic semantic errors need to run the program, so they cannot be checked out when the program is compiled, but can only be found when the program is executed.

By value and by reference

Insert picture description here
The answer to this question is B, according to my understanding

x = 3 is passed into the t() function and
a = 8
f(3,8) is
entered into the f() function.
At this time r = x = 3, s = a = 8 is entered into the function and
x = 7, s = 21, r = 14
and because in C,

When using the value transfer method, the actual parameter value is passed to the formal parameter, and the modification of the formal parameter value will not affect the actual parameter.

When using the reference method, the address of the actual parameter is passed to the formal parameter, and the modification of the formal parameter is equivalent to the modification of the actual parameter.

So return a+x in the t function is
because the first parameter x is passed by value, so the value changed by entering the f function is also a formal parameter and will not affect the actual parameter, so x=3

But the second parameter a = 8 enters f() by reference, so it is equivalent to modifying the formal parameters while also modifying the actual parameters (modifying the address of the actual parameter directly causes the actual parameter to change) So when a is passed into the f function, the modified value corresponds to s, so the final value of s is equal to the value of a, so a = 21

Looking at the t function again, a+x = 21+3 = 24

Basic path test

Calculate the complexity of the program loop

The loop complexity of the program gives the number of independent paths in the basic path set of the program

The upper bound of the number of test cases necessary to ensure that each executable statement in the program is executed at least once

Three calculation methods of program loop complexity:

1. The number of areas in the program control flow graph

2. The number of edges in the program control flow graph-the number of nodes in the program control flow graph + 2

3. The number of decision nodes in the program control flow graph +1

Insert picture description here
From this question, we can see that the number of edges-nodes + 2 = 6

Object-Oriented Analysis Model

UML 2.0 supports 13 types of diagrams, which can be divided into two categories: structure diagrams and behavior diagrams.

Structure diagrams include class diagrams, combined structure diagrams, component diagrams, deployment diagrams, object diagrams and package diagrams;

Behavior diagrams include activity diagrams, interaction diagrams, use case diagrams, and state diagrams. Interaction diagrams are collectively called sequence diagrams, communication diagrams, interaction overview diagrams, and sequence diagrams.

Concept design specification

概要设计说明书的评测内容如下:
可追溯性:分析该软件的系统结构、子系统结构,确认该软件设计是否覆盖了所有已确定的软件需求,软件每一成分是否可追溯到某一项需求。
接口:分析软件各部分之间的联系,确认该软件的内部接口与外部接口是否已
经明确定义,模块是否满足高内聚和低祸合的要求,模块作用范围是否在其控
制范围之内。
风险:确认该软件设计在现有技术条件下和预算范围内是否能按时实现。
实用性:确认该软件设计对于需求的解决方案是否实用。
技术清晰度:确认该软件设计是否以一种易于翻译成代码的形式表达。
可维护性:从软件维护的角度出发,确认该软件设计是否考虑了方便未来的维护。
质量:确认该软件设计是否表现出良好的质量特征。
各种选择方案:看是否考虑过其他方案,比较各种选择方案的标准是什么。
限制:评估对该软件的限制是否现实,是否与需求一致。

Guess you like

Origin blog.csdn.net/Python_BT/article/details/108507342