STE en

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 21

Topics:

Testing Theory

Test Concepts

What is a Test Case?

A TEST CASE is a set of conditions or variables under which a tester will determine
whether a system under test satisfies requirements or works correctly. The process of
developing test cases can also help find problems in the requirements or design of an
application.

Functional vs. Non-Functional Test Cases

Functional testing is a type of testing which verifies that each function of the software
application operates in conformance with the requirement specification. This testing
mainly involves black box testing, and it is not concerned about the source code of the
application.

Every functionality of the system is tested by providing appropriate input, verifying the
output and comparing the actual results with the expected results. This testing involves
checking of User Interface, APIs, Database, security, client/ server applications and
functionality of the Application Under Test. The testing can be done either manually or
using automation

Non-functional testing is a type of testing to check non-functional aspects (performance,


usability, reliability, etc.) of a software application. It is explicitly designed to test the
readiness of a system as per nonfunctional parameters which are never addressed by
functional testing.

A good example of non-functional test would be to check how many people can
simultaneously login into a software.

What is a Test Specification?

It specifies the purpose of a specific test, identifies the required inputs and expected
results, provides step-by-step procedures for executing the test, and outlines the pass/fail
criteria for determining acceptance. Test Case Specification has to be done separately for
each unit.

What is a Test Report?


Test Report is a document which contains. A summary of test activities and final test
results. An assessment of how well the Testing is performed.

It contains:

Smoke Tests, Regression Tests, Stress Tests.

SMOKE TESTING is a type of software testing that determines whether the deployed build
is stable or not. The purpose of Smoke Tests it to confirm whether the QA team can proceed
with further testing. Smoke tests are a minimal set of tests run on each build.

REGRESSION TESTING is defined as a type of software testing to confirm that a recent


program or code change has not adversely affected existing features.

Regression Testing is nothing but a full or partial selection of already executed test cases
which are re-executed to ensure existing functionalities work fine.

STRESS TESTING is a type of Software Testing that verifies the stability & reliability of the
system. This test mainly measures the system on its robustness and error handling
capabilities under extremely heavy load conditions.

Stress Testing is done to make sure that the system would not crash under crunch
situations. It even tests beyond the normal operating point and evaluates how the system
works under those extreme conditions.

Design Validation (Verification)


Product Validation (Environmental tests, EMC tests, functional tests)

Verification is testing that your product meets the specifications / requirements you have

written. "Did I build what I said I would?".

Validation tests how well you addressed the business needs that caused you to write those

requirements. It is also sometimes called acceptance or business testing. "Did I build what I

need?"

Test Methods / Techniques

What is Black Box Testing?

BLACK BOX TESTING is defined as a testing technique in which functionality of the


Application Under Test (AUT) is tested without looking at the internal code structure,
implementation details and knowledge of internal paths of the software. This type of
testing is based entirely on software requirements and specifications. In BlackBox Testing
we just focus on inputs and output of the software system without bothering about internal
knowledge of the software program.

What is White Box Testing?

WHITE BOX TESTING is testing of a software solution's internal structure, design, and
coding. In this type of testing, the code is visible to the tester. It focuses primarily on
verifying the flow of inputs and outputs through the application, improving design and
usability, strengthening security. White box testing is also known as Clear Box testing, Open
Box testing, Structural testing, Transparent Box testing, Code-Based testing, and Glass Box
testing. It is usually performed by developers.

Boundary value technique (practical examples and exercises)


Boundary testing is the process of testing between extreme ends or boundaries between
partitions of the input values.

 So these extreme ends like Start- End, Lower- Upper, Maximum-Minimum, Just
Inside-Just Outside values are called boundary values and the testing is called
"boundary testing".
 The basic idea in boundary value testing is to select input variable values at their:

1. Minimum
2. Just above the minimum
3. A nominal value
4. Just below the maximum
5. Maximum

Example:

Examples 3: Input Box should accept the Number 1 to 10

Here we will see the Boundary Value Test Cases

Test Scenario Description Expected Outcome

Boundary Value = 0 System should NOT accept

Boundary Value = 1 System should accept

Boundary Value = 2 System should accept

Boundary Value = 9 System should accept

Boundary Value = 10 System should accept

Boundary Value = 11 System should NOT accept


Equivalence class technique (practical examples and exercises)

Equivalent Class Partitioning is a black box technique (code is not visible to tester) which
can be applied to all levels of testing like unit, integration, system, etc. In this technique,
you divide the set of test condition into a partition that can be considered the same.

 It divides the input data of software into different equivalence data classes.
 You can apply this technique, where there is a range in the input field.

Example 1: Equivalence and Boundary Value

 Let's consider the behavior of Order Pizza Text Box Below


 Pizza values 1 to 10 is considered valid. A success message is shown.
 While value 11 to 99 are considered invalid for order and an error message will
appear, "Only 10 Pizza can be ordered"

Here is the test condition

1. Any Number greater than 10 entered in the Order Pizza field(let say 11) is
considered invalid.
2. Any Number less than 1 that is 0 or below, then it is considered invalid.
3. Numbers 1 to 10 are considered valid
4. Any 3 Digit Number say -100 is invalid.

We cannot test all the possible values because if done, the number of test cases will be
more than 100. To address this problem, we use equivalence partitioning hypothesis where
we divide the possible values of tickets into groups or sets as shown below where the
system behavior can be considered the same.
The divided sets are called Equivalence Partitions or Equivalence Classes. Then we pick
only one value from each partition for testing. The hypothesis behind this technique is that
if one condition/value in a partition passes all others will also pass. Likewise, if one
condition in a partition fails, all other conditions in that partition will fail.

Test Levels (definitions)

Unit Test

UNIT TESTING is a type of software testing where individual units or components of a


software are tested. The purpose is to validate that each unit of the software code performs
as expected. Unit Testing is done during the development (coding phase) of an application
by the developers.

Integration Test

INTEGRATION TESTING is defined as a type of testing where software modules are


integrated logically and tested as a group. A typical software project consists of multiple
software modules, coded by different programmers. The purpose of this level of testing is
to expose defects in the interaction between these software modules when they are
integrated

System Test

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. Usually, the software is only one element of a larger computer-based system.
Ultimately, the software is interfaced with other software/hardware systems. System
Testing is actually a series of different tests whose sole purpose is to exercise the full
computer-based system.

Acceptance Test

ACCEPTANCE TESTING is a level of software testing where a system is tested for


acceptability. The purpose of this test is to evaluate the system’s compliance with the
business requirements and assess whether it is acceptable for delivery.
Bugs / Defects / Faults / Errors

Definitions, differences, handling

Defect

The variation between the actual results and expected results is known as defect. If a
developer finds an issue and corrects it by himself in the development phase then it’s called
a defect.

Bug

If testers find any mismatch in the application/system in testing phase then they call it as
Bug.

Fault

A fault makes an application behave in a wrong manner. The problems like an invalid step,
lack of resources or inappropriate data definition could cause a fault in a program. It may
happen in software because the developer has not added the code for fault tolerance.

Error

We can’t compile or run a program due to coding mistake in a program. If a developer


unable to successfully compile or run a program then they call it as an error.

Failure

Once the product is deployed and customers find any issues then they call the product as a
failure product. After release, if an end user finds an issue then that particular issue is
called as failure
Software Development Models

V-Cycle

V-Model is an SDLC model that has a testing phase corresponding to every development
stage in the waterfall model. The V-model is an extension of the waterfall model. V model
Testing is done in parallel to development. It is also called a Validation and Verification
Model.

testing in the model starts only after implementation is done.

But if you are working in the large project, where the systems are complex, it's easy to miss
out the key details in the requirements phase itself. In such cases, an entirely wrong
product will be delivered to the client

Agile

AGILE methodology is a practice that promotes continuous iteration of development and


testing throughout the software development lifecycle of the project. Both development
and testing activities are concurrent unlike the Waterfall model

Development process is iterative, and the project is executed in short (2-4) weeks
iterations.

Every iteration has its own testing phase. It allows implementing regression testing every
time new functions or logic are released.

Error can be fixed in the middle of the project.

It requires close communication with developers and together analyze requirements and
planning
Programming

Foundation of Computer Programming

Conversions between different bases (ex. Binary, Decimal, Hex)

Primer 35

U binary:

2 na 0=1

2 na 1= 2

2 na 2=4

2na 3=8

2na4=16

2na5=32

2na6=64

35 podeljeno sa 32= 1 I ostatak je 3

Prva cifra je 1

3 podeljeno sa 16 je 0 a ostatak je 3

Druga cifra j 0

3 podeljeno sa 8 je 0 a ostatak je 3

Treca cifra je 0

3podeljeno sa 4 je 0, a ostatak je 3

Cetvrta cifra je 0
3 podeljeo sa 2 je 1 I ostatak je 1

Peta cifra je 1

1podeljeno sa 1 je 1,ostatak je 0

Sesta cifra je 1

Odogvor je da je 35 decimalno = 100011 binarno

U octal:

8 na0=1

8na1=8

8na2=64

8na 3=512

35podeljeno sa 8=4, ostatak je 3

Prva cifra je 4

3podeljeno sa 1 je 3, ostatak je 0

Druga cifra je 3

Odgovor:35 decimalno je 43 oktalno


U hexadecimal:

16 na 0 je 1

16 na 1 je 16

16 na 2 je 256

35 podeljeno sa 16 je 2, ostatak 3

Prva cifra je 2

3 podeljeno sa 1 je 3, ostatakje 0

Druga cifra je 3

Odgovor: 35 binarno je 23 heksadecimalno


Elements of BOOLEAN logic

Named after the nineteenth-century mathematician George Boole, Boolean logic is a form
of algebra in which all values are reduced to either TRUE or FALSE. Boolean logic is
especially important for computer science because it fits nicely with the binary numbering
system, in which each bit has a value of either 1 or 0.

The four fundamental Boolean operators are:


 NOT
 AND
 OR
 XOR
There are two other operators derived from the three basic ones:
 NAND
 NOR

NOT (complement or inverter)


The NOT operator accepts the value of one Boolean variable as input and outputs the
opposite of this value. See Table L-5.

Table L-5: NOT Truth Table

VALUE 0 1

NOT (VALUE) 1 0

AND (Boolean product)


The AND operator accepts two Boolean variables as input and outputs their Boolean
product. See Table L-6.

Table L-6: AND Truth table

VALUE1 0 0 1 1
VALUE2 0 1 0 1

VALUE1 AND VALUE2 0 0 0 1

OR (Boolean sum)
The OR operator accepts two Boolean variables as input and outputs their Boolean sum.
See Table L-7.

Table L-7: OR Truth table

VALUE1 0 0 1 1

VALUE2 0 1 0 1

VALUE1 OR VALUE2 0 1 1 1

XOR (exclusive OR)


The XOR operator accepts two Boolean variables as input and outputs their exclusive
Boolean sum (exactly one of the variables must be 1 for XOR output to be 1). See Table L-8.

Table L-8: XOR Truth table

VALUE1 0 0 1 1

VALUE2 0 1 0 1

VALUE1 XOR VALUE2 0 1 1 0

NAND (inversed AND)


The NAND operator accepts two Boolean variables as input and outputs the opposite of
their Boolean product. See Table L-9.

Table L-9: NAND Truth table


VALUE1 0 0 1 1

VALUE2 0 1 0 1

VALUE1 NAND VALUE2 1 1 1 0

Note NOT(A AND B) is not the same


as NOT(A) AND NOT(B).

NOR (inversed OR)


The NOR operator accepts two or more Boolean variables as input and outputs the
complement of their Boolean sum. See Table L-10.

Table L-10: NOR Truth table

VALUE1 0 0 1 1

VALUE2 0 1 0 1

VALUE1 NOR VALUE2 1 0 0 0

Note NOT(A OR B) is not the same


as NOT(A) + NOT(B).

Rules of precedence
Table L-11 shows the precedence rules of the Boolean algebra operators.

Table L-11: Boolean Algebra Operator Precedence

Precedence level Operator

1 brackets ( )
Table L-11: Boolean Algebra Operator Precedence

Precedence level Operator

2 Boolean complement NOT

3 Boolean product AND

4 Boolean sum OR

Note Brackets have the highest precedence, i.e., everything inside brackets is evaluated
first.

Table L-12: Precedence Rules Illustration

Step Expression Explanation

1 NOT(1 OR 0) OR 1 AND 1 OR 0 is inside the brackets, so evaluate it first. The


0 result is 1, so replace (1 OR 0) with 1.

2 = NOT(1) OR 1 AND 0 Evaluate the complement next. NOT(1) = 0.


Replace NOT(1) with 0.

3 = 0 OR 1 AND 0 Evaluate the product next. 1 AND 0 = 0.


Replace 1 AND 0 with 0.

4 = 0 OR 0 Now, evaluate the sum. 0 OR 0 = 0, so the result of


the expression is 0.

5 =0 We are done.
Data types, value ranges, signed vs. unsigned

Data types

Common data types include:

 Integer.
 Floating-point number.
 Character.
 String.
 Boolean.

Value ranges

In computer programming, range refers to possible variable values or the interval that
includes the upper and lower bounds of an array.

When you are given various values, the range of those values is how big the difference is
between the largest value and the smallest value. In other words, the range is what you get
when you subtract the smallest value in the group from the largest value in the group.

Steps to Finding Range


You can easily find the range by following a series of steps.
1. The first thing you want to do is to order your values from the smallest to the largest.
2. Next, you take the largest value and subtract the smallest value from it.

Nick is 5 years old, Sam is 3 years, Sarah is 2 years, Julie is 10 years old, and Zach is 12
years old. We want to find the range of the ages of the kids.
1. Our first step is to order the ages of the kids starting from the youngest and going to the
oldest. Doing this, we have 2, 3, 5, 10, and 12. Sarah is the youngest at 2 years of age and
Zach is the oldest at 12 years of age.
2. Our next step is to take the oldest age of 12 years and subtract the youngest age of 2
years from it. So, 12-2=10 gives us our range. 10 is the range of the ages of the kids.

Signed vs unsigned

Signed variables, such as signed integers will allow you to represent numbers both in the
positive and negative ranges.

Unsigned variables, such as unsigned integers, will only allow you to represent numbers
in the positive.

Unsigned and signed variables of the same type (such as int and byte) both have the same
range (range of 65,536 and 256 numbers, respectively), but unsigned can represent a
larger magnitude number than the corresponding signed variable.

For example, an unsigned byte can represent values from 0 to 255, while signed byte can
represent -128 to 127. (Adding 128 + 127 = 255)[1]

To reiterate, the main differences between Signed & Unsigned data type or variable in java
is:

1. Unsigned can hold larger positive values, but no negative values.


2. Unsigned uses the leading bit as a part of the value, while the signed version uses
the leftmost bit to identify whether the number is positive or negative.
Alternatively, two’s complement can be used to designate a number as positive or
negative.
3. Re-iterating, Signed data types can hold positive and negative numbers
Variables and constants

A constant is a value that cannot be altered by the program during normal execution, i.e.,
the value is constant. When associated with an identifier, a constant is said to be “named,”
although the terms “constant” and “named constant” are often used interchangeably. This is
contrasted with a variable, which is an identifier with a value that can be changed during
normal execution, i.e., the value is variable

A constant is a data item whose value cannot change during the program’s execution. Thus,
as its name implies – the value is constant.

A variable is a data item whose value can change during the program’s execution. Thus, as
its name implies – the value can vary.

Repetitive structures, decision structures

Repetitive control structures, also referred to as iterative structures, are groupings of


code which are designed to repeat a set of related statements. This repetition (or iteration)
can repeat zero or more times, until some control value or condition causes the repetition
to cease. We use iterative controls when we need to do the same task more than once,
based upon some logical condition. While the terms repetition and iteration are very
descriptive words, the common term to describe these control structures is loop. Loops
consist of two logical parts; the condition (i.e. the logic that evaluates the condition), and
the loop body (i.e. where the code integral to the loop is located). I categorize loops into
two general categories:

1. indeterminate loops
2. determinate loops

The difference being that with a determinate loop structure, one can (normally)
predict exactly how many times the loop will repeat; whereas with an indeterminate loop
structure, this is not always the case. An indeterminate loop structure loops as long as a
condition evaluates to some certain boolean value. Indeterminate loops should be used
when the programmer does not know exactly how many times the iteration need occur.
Logically however, both indeterminant and determinate loops can be written to be
equivalent.

In most computer programming languages, a do while loop is a control


flow statement that executes a block of code at least once, and then repeatedly executes the
block, or not, depending on a given boolean condition at the end of the block.
The do while construct consists of a process symbol and a condition. First, the code within
the block is executed, and then the condition is evaluated. If the condition is true the code
within the block is executed again. This repeats until the condition becomes false. Because
do while loops check the condition after the block is executed, the control structure is often
also known as a post-test loop. Contrast with the while loop, which tests the condition
before the code within the block is executed, the do-while loop is an exit-condition loop.

A decision structure is a construct in a computer program that allows the program to


make a decision and change its behavior based on that decision. The decision is made based
on the outcome of a logical test. A logical test is a calculation whose outcome is either true
or false.

The if statement is the simplest example of a decision structure in Java. In an if statement a


logical test is made which can evaluate to either true or false. If the result of the test is true,
the statements in the if branch are executed. If the result of the test is false, the statements
in the else branch are executed. Once the statements in the appropriate branch have been
executed, the flow of execution continues on to the statements that follow the if statement.

Pseudo-code

Pseudocode is an informal way of programming description that does not require any strict
programming language syntax or underlying technology considerations. It is used for
creating an outline or a rough draft of a program

Pseudocode is not an actual programming language. So it cannot be compiled into an


executable program. It uses short terms or simple English language syntaxes to write code
for programs before it is actually converted into a specific programming language. This is
done to identify top level flow errors, and understand the programming data flows that the
final program is going to use.

Pseudocode is understood by the programmers of all types.

• it enables the programmer to concentrate only on the algorithm part of the code
development.

• It cannot be compiled into an executable program. Example, Java code : if (i < 10) { i++; }
pseudocode :if i is less than 10, increment i by 1.
Example:

If student's grade is greater than or equal to 60

Print "passed"
else
Print "failed"

Electronics

Discrete components

Resistors, capacitors, transistors, diodes, LEDs

Serial and parallel connections

Laws of Ohm and Kirchhoff

Reading basic schematics

Logical gates

Test Equipment

Equipment for measurement and control

Multimeters

Oscilloscopes

Power supplies

Signal generators

Acquisition systems

Microcontrollers and memory

Introduction to embedded systems (basics)

What is a microcontroller?
Microcontrollers vs. microprocessors

Memory types (external and internal)

Interrupts (types, main mechanism)

Busses (data, address, addressing space)

The internal structure of a microcontroller (registers, converters, ports, etc.)

Signal acquisition and processing

General knowledge

Signal types

Amplitude, duty-cycle, frequency

Conversions (ADC, DAC)

Signal modulation (amplitude and frequency)

*Note: detailed information regarding any of the above topics can be found on the Internet

You might also like