Guru99 Flashcards

1
Q

What is software testing?

A

an activity to check whether the actual results match the expected results and to ensure that the software system is Defect free.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

AUT

A

Application Under Test

In simple terms, Software Testing means Verification of Application Under Test (AUT).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

3 categories of software testing

A
  1. Functional testing (unit testing, integration testing, etc.)
  2. Non-functional testing (performance, endurance, load, usability, etc.)
  3. Maintenance (regression, maintenance)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

The 7 testing principles

A

1) Exhaustive testing is not possible
2) Defect Clustering
3) Pesticide Paradox
4) Testing shows a presence of defects
5) Absence of Error - fallacy
6) Early Testing
7) Testing is context dependent

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Principle: Exhaustive testing is not possible

A

We can’t test every test case, so we need the optimal amount of testing based on the risk assessment of the application.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Principle: Defect Clustering

A

a small number of modules contain most of the defects detected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Principle: Pesticide Paradox

A

If the same tests are repeated over and over again, eventually the same test cases will no longer find new bugs.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Principle: Testing shows a presence of defects

A

Software testing talks about the presence of defects and doesn’t talk about the absence of defects.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Principle: Absence of Error - fallacy

A

It is possible that software which is 99% bug-free is still unusable. It must also fulfill customer requirements.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Principle: Early Testing

A

Testing should start as early as possible in the Software Development Life Cycle. Defects in requirements or design are captured early, too.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Principle: Testing is context dependent

A

Different types of software need to perform different types of testing.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SDLC

A

Software Development Life Cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

STLC

A

Software Testing Life Cycle

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

The V model

A

Requirement analysis System testing
High level design Integration testing
Low level design Unit testing
Coding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Phases of STLC

A
Requirements analysis
Test planning 
Test case development 
Test environment setup
Test execution
Test cycle closure
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Types of testing that could be manual or automated

A
Black Box Testing
White Box Testing
Unit Testing
System Testing
Integration Testing
Acceptance Testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Unit testing

A

Unit Tests isolate a section of code and verify its correctness. A unit may be an individual function, method, procedure, module, or object. Developers write unit tests during the coding phase.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Unit testing advantages

A

Allows for refactoring at a later date.
New developers can learn functionality of the code.
Can test parts without waiting for others to complete.
Find and fix errors faster than in integration testing, where errors are hard to trace down.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

Integration testing

A

A type of testing where software modules are integrated logically and tested as a group.

Data transfer between modules is tested thoroughly.

20
Q

Big-bang integration testing

A

Wait for all modules to be developed before beginning testing. Convenient for small systems.

Disadvantage: time consuming waiting for developers, difficult to trace root cause of defects, and high-risk modules are not prioritized

21
Q

Incremental integration testing

A

Testing is done by joining two or more modules that are logically related. Then the other related modules are added and tested as they are available.

Top-down (higher layers first): create stubs.
Bottom-up: create drivers

The focus is mainly on the interfaces & flow of data/information between the modules. Priority is to be given for the integrating links rather than the unit functions which are already tested.

22
Q

Stub

A

Is called by the Module under Test

23
Q

Driver

A

Calls the Module to be tested

24
Q

System testing

A

System testing is a level of testing that validates the complete and fully integrated software product. The purpose of a system test is to evaluate the end-to-end system specifications.

Includes usability testing, load testing, regression testing, recovery testing, migration testing, functional testing, hardware/software testing, etc.

25
Q

Compiler vs. Interpreter

A

A compiler transforms source language into object language (machine language, binary code).
Generates output program (in the form of exe) which can be run independently from the original program.
Ex: C, C++, C#, Java

An interpreter converts the program one line at a time, it does not produce any intermediate object code, and compilation and execution happen simultaneously.
Ex: Python, Matlab

26
Q

Compiler vs interpreter programming steps

A

Compiler:

  1. Create the program.
  2. Compile will parse or analyses all of the language statements for its correctness. If incorrect, throws an error
  3. If no error, the compiler will convert source code to machine code.
  4. It links different code files into a runnable program (know as exe)
  5. Run the Program

Interpreter:

  1. Create the Program
  2. No linking of files or machine code generation
  3. Source statements executed line by line DURING Execution
27
Q

Linker

A

In the compiler, the linker links several object (and library) files to generate an executable.

Building a complete program involves writing source code for the program in either assembly or a higher level language like C++. The source code is assembled (for assembly code) or compiled (for higher level languages) to object code, and individual modules are linked together to become the machine code for the final program. In the case of very simple programs the linking step may not be needed. In other cases, such as with an IDE (integrated development environment) the linker and compiler may be invoked together.

28
Q

Machine code

A

binary (1’s and 0’s) code that can be executed directly by the CPU

29
Q

Object code

A

A portion of machine code that hasn’t yet been linked into a complete program. It’s the machine code for one particular library or module that will make up the completed product.

An object file is the simplest binary file which comes from the compilation of a single translation unit (TU) into executable code. Usual extensions: .o or .obj (MSVC).

30
Q

Assembly code

A

Assembly code is plain-text and (somewhat) human read-able source code that mostly has a direct 1:1 analog with machine instructions. This is accomplished using mnemonics for the actual instructions, registers, or other resources. Examples include JMP and MULT for the CPU’s jump and multiplication instructions.

31
Q

Header file

A

Contains C++ source code and they are mostly used to make declarations, i.e., they contain the stubs that tell the compiler about the “things” that exists (somewhere). Usual extensions: .hpp, .h, or .hxx.

32
Q

Source file

A

Contains C++ source code and they are exclusively used for definitions, i.e., the actual implementation of the “things” that make up the program or library. Usual extensions: .cpp, .C, or .cxx (normally, .c is reserved for C source files, not C++).

An example of how a source file is organized: it first includes its corresponding header, then any other header it needs, and finally, the definitions of each of the declared elements of its corresponding header.

33
Q

Translation unit (TU)

A

A technical term for a source file, once the compiler has looked at all #include statements and substituted them for the header files they refer to.

Once the pre-processor has finished, we can say that a translation unit (TU) has been fully formed from a source file with all its included headers fetched and copied into it, all its MACROs found-and-replaced, and all its conditional compilation blocks resolved.

34
Q

Static library (or static-link library)

A

A binary file which is very similar to an object file but is larger and usually the product of many object files combined into one file for convenience. The GNU stack refers to static libraries as archives, i.e., collections of object files. Usual extensions: .a or .lib (MSVC).

35
Q

Dynamic library (or dynamic-link library or shared object)

A

A binary file also created from a set of object files, but they are packaged as a standalone executable library (not a program). Usual extensions: .so (POSIX) or .dll (Windows).

36
Q

Executable program

A

This is a type of binary file that can be started and executed, i.e., it has an execution entry-point. In short, this is a program you can run. Usual extensions: (POSIX) or .exe (Windows).

37
Q

Pre-processor

A

Looks for # commands. The pre-processor is mostly a glorified find-and-replace tool. The step before compiling.

38
Q

Compiler static analysis

A

Between pre-processing and code generation, the compiler does some steps that involve terms like lexical analysis, syntax analysis, context-dependent grammars, semantic analysis, etc… Suffice it to say, broadly speaking, the compiler builds up an Abstract Syntax Tree (AST) and a symbol table.

39
Q

Build

A

Compiling is the act of turning source code into object code. Linking is the act of combining object code with libraries into a raw executable. Building is the sequence composed of compiling and linking, with possibly other tasks such as installer creation.

40
Q

Smoke Testing

A

Smoke Testing is performed after software build to ascertain that the critical functionalities of the program are working fine. It is executed before any detailed functional or regression tests.

For Example, a typical smoke test would be - Verify that the application launches successfully, Check that the GUI is responsive … etc.

41
Q

Sanity testing

A

Sanity testing is performed after receiving a software build with minor changes in code to ascertain that the bugs have been fixed and no further issues are introduced. The goal is to determine that it works roughly as expected.

For instance, if your calculator gives the result of 2 + 2 =5, then, there is no point testing the advanced functionalities like sin 30 + cos 50.

42
Q

Smoke test vs. Sanity test

A

Smoke Testing has a goal to verify “stability” whereas Sanity Testing has a goal to verify “rationality”.

Smoke Testing verifies the critical functionalities of the system whereas Sanity Testing verifies the new functionality like bug fixes.

Smoke testing is a subset of acceptance testing whereas Sanity testing is a subset of Regression Testing.

Smoke testing is documented or scripted whereas Sanity testing isn’t.

Smoke testing verifies the entire system from end to end whereas Sanity Testing verifies only a particular component.

43
Q

Build VerificationTest

A

Smoke testing performed on a particular build is also known as a build verification test.

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.

44
Q

Regression testing

A

This testing is done to make sure that new code changes should not have side effects on the existing functionalities. It ensures that the old code still works once the latest code changes are done.

45
Q

Non-functional testing

A

A type of Software testing to check non-functional aspects (performance, usability, reliability, etc) of a software application. It is designed to test the readiness of a system as per nonfunctional parameters which are never addressed by functional testing.

Non-functional testing parameters: security, reliability, survivability, availability, usability, scalability, interoperability, efficiency, flexibility, portability, re-usability

46
Q

Requirements Traceability Matrix (RTM)

A

Requirement Traceability Matrix (RTM) is a document that maps and traces user requirement with test cases. The main purpose is to validate that all requirements are checked via test cases such that no functionality is unchecked during Software testing.