Industrial Training

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 49

INDUSTRIAL TRAINING

( Product Testing )

Final Report

Submitted in Partial Fulfillment of the Requirements for the Award of Degree

Of

Bachelor in Technology

In

Electronics and Communication Engineering

Chandigarh Engineering College

Submitted to:

Ms. Priyanka Kamboj

Submitted by:

Sandhya Saini 1802464

1
ACKNOWLEDGEMENT
I take this opportunity to express my sincere gratitude to the Principal, Chandigarh
Engineering College, Landran, for providing this opportunity to carry out the present work.
The constant guidance and encouragement received from Prof. (Dr.) Vinay Bhatia,
Professor and Head, Department of Electronics and Communication Engineering, has been of
great help in carrying our present work and helped us in completing this project with success.

I would like to express a deep sense of gratitude to my Project Guide Mr. Sunil Kumar,
Product Testing department(Wipro) for the guidance and support in defining the design problem
and towards the completion of my project work. Without his wise counsel and able guidance, it
would have been impossible to complete the thesis in this manner.
 
I am also thankful to all the faculty and staff members of Department of Electronics and
Communication Engineering, Chandigarh Engineering College, Landran for their intellectual
support throughout the course of this work.

Sandhya Saini (1802464)

2
Table of Contents

Acknowledgement 2

Chapter 1 Company profile 8

Chapter 2 Department 9

Chapter 3 Product testing 10-11

3.1 Introduction 10

Chapter 4 Python Fundamentals 12-16

4.1 Introduction to Python 12

4.2 Language Basics 12

4.3 Flow control statements 13

Chapter 5 Data Structures 17-19

5.1 Introduction 17

5.2 List 18

5.3 Dictionary 18

5.4 Tuple 18

5.5 Set 18

5.6 String 19

Chapter 6 Function/Modules/Packages 20-22

6.1 Functions 20

6.2 Modules 21

6.3 Packages 22

Chapter 7 Command Line Arguments 23

7.1 Introduction 23

Chapter 8 IO Operations 24-25

3
8.1 Introduction 24

Chapter 9 Exception Handling 26

9.1 Introduction 26

Chapter 10 Testing Concepts 27-34

10.1 Testing Fundamentals 27

10.2 SDLC Models 28

10.3 Classification of Testing 30

10.4 Software Testing Techniques 30

10.5 Test Planning and Design 31

10.6 Defect Management 32

10.7 Functional Testing 33

10.8 Non Functional Testing 34

Chapter 11 Unix Fundamental 35-37

11.1 Introduction 35

11.2 Unix Backup Tools 36

11.3 Vi Editor 36

Chapter 12 Unix Shell Scripting 38-40

12.1 Introduction 38

12.2 Variables and Operators 38

12.3 Advanced Features 39

Chapter 13 Networking Fundamentals 41-44

13.1 Introduction 41

13.2 Network Media and devices 41

13.3 IP Address and SubNet Mask 42

13.4 OSI Model and PDU 43

4
Chapter 14 Project 45-48

14.1 Introduction 45

14.2 Registration page 46

14.3 Login Page 46

14.4 Website Interface 47

14.5 Shopping Cart 47

14.6 Shopping History 48

Reference 49

5
List Of Figures

Serial Number Description Page Number

1 3.1.a Automation Testing 11

2 3.1.b Manual Testing 11

3 4.2.a Flowchart of if-else statement 13

4 4.2.b Flowchart of nested if-else statement 14

5 4.2.c Flowchart of for statement 14

6 4.2.d Flowchart of while statement 16

7 4.2.e Flowchart of break statement 16

8 4.2.f Flowchart of continue statement 18

9 10.2 Software development life cycle models 29

10 13.4 OSI Model Layers 44

11 14.1 Code 45

12 14.2 Registration page 46

13 14.3 Login Page 46

14 14.4 Website Interface 47

15 14.5 Shopping Cart 47

16 14.6 Shopping History 48

6
List Of Tables

Serial Number Description Page Number

1 5.6 Difference between Tuple and List 19

2 8.1.a Modes in File opening 25

3 8.1.b Attributes in File opening 25

4 9.1 Types of Exceptions 26

5 11.3 Vi editor commands 37

6 13.4 Functions of different OSI model layers 44

7
Chapter 1- Company Profile
Wipro Limited (formerly, Western India Palm Refined Oils Limited) is an Indian multinational
corporation that provides information technology, consulting and business process services. It is
headquartered in Bangalore, Karnataka, India.

Wipro's capabilities range across cloud computing, cyber security, digital transformation,
artificial intelligence, robotics, data analytics, and other technology consulting services to
customers in 67 countries.

Wipro is a global information technology, consulting, and business process services company. It
provides enterprises and organizations with a range of IT services, including digital strategy
advisory, technology consulting, custom application design, development, systems integration,
package implementation, cloud infrastructure services, research and development as well as
hardware and software design. In addition, the company offers third-party IT products, which
include computing, platforms, storage, networking solutions, and enterprise information security
and software products.

Wipro Limited is a market leading Information Technology, consulting and business process
services company. Wipro utilizes the power of analytics, robotics, cloud and other emerging
technologies to help clients spread across six different continents to adapt to the current digital
trend and help them thrive to success.

Wipro's Vision

"To earn our clients trust and maximize the value of their business by providing solutions that
integrate deep industry insights, leading technologies and best in class delivery processes."

Wipro follow below principles

1. Be passionate about client's success


2. Be global and responsible
3. Treat each person with respect
4. Unyielding integrity in everything we do

8
Chapter 2- Department

Product Testing
Software Products need their own unique approach to test adequately and correctly. Often times,
teams treat them as any other software (i.e. internal applications built for a specific client or
team; not accessible by the general public; non-revenue generating) and that is the starting point
of trouble.

Software Product Testing needs a custom test style and strategy to add value. Software Product
development and sustenance is in itself a complex ecosystem and to thrive testers need to adapt.

Testing has to take five key points into account:

● Speed of development and releases


● Short term and Long term product goals of the product
● Extent and nature of competition
● Target audiences and their environments
● Requirements – Functional, performance, security, usability, configuration, etc.

Software testing in product development ensures better business optimization, less maintenance

cost, reliability, and superior user experience. Software testing is essential in catching and fixing

a bug in the early phase of the development cycle, resulting in cost and time-saving.

In a nutshell, software testing is a continuous testing process that involves debugging to deliver

an error-free product. Software testing can make or break your product. Hence, it is crucial to

outsource software testing to the right QA partner.

9
Chapter 3- Product testing

3.1 Introduction
Product testing, also called consumer testing or comparative testing, is a process of measuring
the properties or performance of products.

The theory is that since the advent of mass production, manufacturers produce branded products
which they assert and advertise to be identical within some technical standard.

Product testing seeks to ensure that consumers can understand what products will do for them
and which products are the best value. Product testing is a strategy to increase consumer
protection by checking the claims made during marketing strategies such as advertising, which
by their nature are in the interest of the entity distributing the service and not necessarily in the
interest of the consumer. The advent of product testing was the beginning of the modern
consumer movement.

Product testing might be accomplished by a manufacturer, an independent laboratory, a


government agency, etc. Often an existing formal test method is used as a basis for testing. Other
times engineers develop methods of test which are suited to the specific purpose. Comparative
testing subjects several replicate samples of similar products to identical test conditions.

Product testing might have a variety of purposes, such as:

● Determine or verify that, the requirements of a specification, regulation, or contract


are met
● Decide if a new product development program is on track
● Provide standard data for other scientific, engineering, and quality assurance
functions
● Validate suitability for end-use
● Provide a basis for technical communication
● Provide a technical means of comparison of several options
● Provide evidence in legal proceedings: product liability, patents, product claims, etc.
● Help solve problems with current product
● Help identify potential cost savings in products

10
Product tests can be used for:

● Subjecting products to stresses and dynamics expected in use


● Reproducing the types of damage to products found from consumer usage
● Controlling the uniformity of production of products or components

11
Chapter 4- Python Fundamentals

4.1 Introduction to Python


Python is a popular programming language. It was created by Guido van Rossum, and released
in 1991.

● Python can be used on a server to create web applications.


● Python can be used alongside software to create workflows.
● Python can connect to database systems. It can also read and modify files.
● Python can be used to handle big data and perform complex mathematics.
● Python can be used for rapid prototyping, or for production-ready software development.
● Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
● Python has a simple syntax similar to the English language.
● Python has syntax that allows developers to write programs with fewer lines than some
other programming languages.
● Python runs on an interpreter system, meaning that code can be executed as soon as it is
written. This means that prototyping can be very quick.
● Python can be treated in a procedural way, an object-oriented way or a functional way.

4.2 Language Basics


Python is implicitly and dynamically typed, so you do not have to declare variables. The types
are enforced, and the variables are also case sensitive, so var and VAR are treated as two separate
variables. To know how any object work, we need to type the following: help(object)

● Indentation refers to the spaces at the beginning of a code line.Where in other


programming languages the indentation in code is for readability only, the indentation in
Python is very important. Python uses indentation to indicate a block of code.

● In Python, variables are created when you assign a value to it. Python has no command
for declaring a variable.

12
● Python has commenting capability for the purpose of in-code documentation.Comments
start with a #, and Python will render the rest of the line as a comment.
● In Python, pass, and comment both are quite similar. The pass contains a Null value. The
Python interpreter ignores the comment statement, but it’s not possible to ignore a pass
statement. There is nothing that is going to execute when a pass is used. It is used as a
PlaceHolder in a loop or a function.

4.3 Flow control statements


A Flow Control Statement defines the flow of the execution of the Program.
There are 6 different types of flow control statements available in Python:

if-else
If-else is used for decision making; when code statements satisfy the condition, then it will return
non-zero values as true, or else zero or NONE value as false, by the Python interpreter.

Nested if-else
With if...elif...else, elif is a shortened form of else if. It works the same as 'if' statements, where
the if block condition is false then it checks to elif blocks. If all blocks are false, then it executes
an else statement. There are multiple elif blocks possible for a Nested if...else.

13
for Statement
The for loop statement has variable iteration in a sequence(list, tuple or string) and executes
statements until the loop does not reach the false condition.

while loop
A while loop is used in python to iterate over the block of expression which matches to true.
Non-zero values are True and zero and negative values are False, as interpreted in Python.

14
Break statement
The Python Break statement is used to break a loop in a certain condition. It terminates the loop.
Also, we can use it inside the loop then it will first terminate the innermost loop.

15
Continue Statement
A continue statement won’t continue the loop, it executes statements until the condition matches
True.

16
Chapter 5- Data Structures

5.1 Introduction
Data structures are the organizers and storers of data in an efficient manner so that they can be
modified and accessed in the future. To suit different uses, there are different data structures in
Python. These can be mainly classified into two types:

1. Python Built-in data structures: These are the data structures that come along with Python and
can be implemented same as primitive data types like integers, etc. These can be further
classified into:

a. Lists

b. Sets

c. Tuples

d. Dictionaries

2. Python User-defined data structures: These data structures are the ones built using the built-in
data structures and have their own properties. Based on these features, these are used in suitable
situations. These can be subdivided into:

a. Stacks

b. Queues

c. Linked Lists

d. Hash Maps

e. Trees

f. Graphs

17
5.2 List
Lists are used to store multiple items in a single variable.These store the data in a continuous
manner in the memory. These are mainly used in situations where there is a need to access the
data frequently, which can be done easily using indexing.Lists are created using square brackets.
Example: list1=[]
list2=[1,2.4,'abc',(1,2),[6,78,9]]

5.3 Dictionary
Dictionaries are data structures that store key-value pairs. These can be thought of as real-life
dictionaries, where unique words are lapped to their meanings. These keys should be unique and
cannot be changed. So we cannot use unhashable/ modifiable data such as a list as key.A
dictionary uses curly braces to hold its key-values and commas to separate them.
Example: dict1={1:'a',4:'t',8:9}

5.4 Tuple
A tuple is also a collection of elements of different data types. The difference between a tuple
and a list is that lists are mutable whereas tuples are not.The elements of a tuple are enclosed by
round brackets with each element separated by a comma.
Example: tup=(1,2,'a',4.5,[9,0,7],('s','r'))

5.5 Set
Sets are again a collection of elements.Sets do not hold duplicate values and the elements are not
ordered. So, we cannot use indexing here. The elements get automatically arranged in ascending
order.
Example: set1={6,'h',(4,0.5),7}

18
5.6 String
Strings are arrays of bytes representing Unicode characters. However, Python does not have a
character data type, a single character is simply a string with a length of 1. Square brackets can
be used to access elements of the string.Strings in Python can be created using single quotes or
double quotes or even triple quotes.
Example: String1="Sandhya"

19
Chapter 6- Function/Modules/Packages

6.1 Functions
A function is a block of organized, reusable code that is used to perform a single, related action.
Functions provide better modularity for your application and a high degree of code reusing.

You can define functions to provide the required functionality. Here are simple rules to define a
function in Python.

● Function blocks begin with the keyword def followed by the function name and
parentheses ( ( ) ).
● Any input parameters or arguments should be placed within these parentheses. You can
also define parameters inside these parentheses.
● The first statement of a function can be an optional statement - the documentation string
of the function or docstring.
● The code block within every function starts with a colon (:) and is indented.
● The statement return [expression] exits a function, optionally passing back an expression
to the caller. A return statement with no arguments is the same as return None

You can call a function by using the following types of formal arguments −

● Required arguments
● Keyword arguments
● Default arguments
● Variable-length arguments

Scope of Variables

All variables in a program may not be accessible at all locations in that program. This depends
on where you have declared a variable.The scope of a variable determines the portion of the
program where you can access a particular identifier. There are two basic scopes of variables in
Python −

● Global variables
● Local variables

20
6.2 Modules

A module allows you to logically organize your Python code. Grouping related code into a
module makes the code easier to understand and use. A module is a Python object with
arbitrarily named attributes that you can bind and reference.

Simply, a module is a file consisting of Python code. A module can define functions, classes and
variables. A module can also include runnable code.

When the interpreter encounters an import statement, it imports the module if the module is
present in the search path. A search path is a list of directories that the interpreter searches before
importing a module.
A module is loaded only once, regardless of the number of times it is imported. This prevents the
module execution from happening over and over again if multiple imports occur.
Python from statement lets you import specific attributes from a module into the current
namespace.
Example: from fib import fibonacci

It is also possible to import all names from a module into the current namespace by using the
following import statement − from modname import *

The globals() and locals() functions can be used to return the names in the global and local
namespaces depending on the location from where they are called.If locals() is called from
within a function, it will return all the names that can be accessed locally from that function.

If globals() is called from within a function, it will return all the names that can be accessed
globally from that function.The return type of both these functions is dictionary. Therefore,
names can be extracted using the keys() function.

The reload() Function

When the module is imported into a script, the code in the top-level portion of a module is
executed only once.

Therefore, if you want to re-execute the top-level code in a module, you can use the reload()
function. The reload() function imports a previously imported module again.

21
6.3 Packages
A package is a hierarchical file directory structure that defines a single Python application
environment that consists of modules and subpackages and sub-subpackages, and so on.
To tell Python that a particular directory is a package, we create a file named __init__.py inside it
and then it is considered as a package and we may create other modules and sub-packages within
it. This __init__.py file can be left blank or can be coded with the initialization code for the
package.
To create a package in Python, we need to follow these three simple steps:

1. First, we create a directory and give it a package name, preferably related to its
operation.
2. Then we put the classes and the required functions in it.
3. Finally we create an __init__.py file inside the directory, to let Python know that the
directory is a package.

22
Chapter 7- Command Line Arguments

7.1 Introduction
The arguments that are given after the name of the program in the command line shell of the
operating system are known as Command Line Arguments. Python provides various ways of
dealing with these types of arguments. The three most common are:

Using sys.argv
The sys module provides functions and variables used to manipulate different parts of the Python
runtime environment. This module provides access to some variables used or maintained by the
interpreter and to functions that interact strongly with the interpreter.

One such variable is sys.argv which is a simple list structure. It’s main purpose are:

● It is a list of command line arguments.


● len(sys.argv) provides the number of command line arguments.
● sys.argv[0] is the name of the current Python script.

Using getopt module


Python getopt module is similar to the getopt() function of C. Unlike the sys module, getopt
module extends the separation of the input string by parameter validation. It allows both short,
and long options including a value assignment. However, this module requires the use of the sys
module to process input data properly. To use the getopt module, it is required to remove the first
element from the list of command-line arguments.

Using argparse module


Using the argparse module is a better option than the above two options as it provides a lot of
options such as positional arguments, default value for arguments, help message, specifying data
type of argument etc.

23
Chapter 8-IO Operations

8.1 Introduction

Printing to the Screen


The simplest way to produce output is using the print statement where you can pass zero or
more expressions separated by commas. This function converts the expressions you pass into a
string and writes the result to standard output

Reading Keyboard Input


Python provides two built-in functions to read a line of text from standard input, which by
default comes from the keyboard. These functions are −
● raw_input
● input

The raw_input Function


The raw_input([prompt]) function reads one line from standard input and returns it as a string
(removing the trailing newline).
This prompts you to enter any string and it would display the same string on the screen.

The input Function


The input([prompt]) function is equivalent to raw_input, except that it assumes the input is a
valid Python expression and returns the evaluated result to you.

Opening and Closing Files


Until now, you have been reading and writing to the standard input and output. Now, we will
see how to use actual data files.
Python provides basic functions and methods necessary to manipulate files by default. You can
do most of the file manipulation using a file object.

The open Function


Before you can read or write a file, you have to open it using Python's built-in open() function.
This function creates a file object, which would be utilized to call other support methods
associated with it.
Different modes of opening a file-

24
Mode Description

r Open a file for reading only. The file pointer is placed at the beginning of the file.
This is the default mode.

rb Opens a file for reading only in binary format. The file pointer is placed at the
beginning of the file. This is the default mode.

w Open a file for writing only. Overwrites the file if the file exists. If the file does not
exist, create a new file for writing.

wb Opens a file for writing only in binary format. Overwrites the file if the file exists. If
the file does not exist, create a new file for writing.

a Open a file for appending. The file pointer is at the end of the file if the file exists.
That is, the file is in the append mode. If the file does not exist, it creates a new file
for writing.

ab Opens a file for appending in binary format. The file pointer is at the end of the file if
the file exists. That is, the file is in the append mode. If the file does not exist, it
creates a new file for writing.

Attribute Description

file.closed Returns true if the file is closed, false otherwise.

file.mode Returns access mode with which file was opened.

file.name Returns the name of the file.

file.softspace Returns false if space explicitly required with print, true otherwise.

The write() Method


The write() method writes any string to an open file. It is important to note that Python strings
can have binary data and not just text.The write() method does not add a newline character ('\n')
to the end of the string.

The read() Method


The read() method reads a string from an open file. It is important to note that Python strings
can have binary data. apart from text data.

25
Chapter 9- Exception Handling

9.1 Introduction

When an error occurs, or exception as we call it, Python will normally stop and generate an error
message.Exceptions can be handled using the try statement:Since the try block raises an error,
the except block will be executed.Without the try block, the program will crash and raise an
errorThe try block lets you test a block of code for errors.The except block lets you handle the
error.The else block lets you execute code when there is no error.The finally block lets you
execute code, regardless of the result of the try- and except blocks.

Exception Name Description

TypeError Raised when an operation or function is attempted that is invalid for


the specified data type

StandardError Base class for all built-in exceptions except StopIteration and
SystemExit.

ArithmeticError Base class for all errors that occur for numeric calculation.

OverflowError Raised when a calculation exceeds the maximum limit for a numeric
type.

ZeroDivisionError Raised when division or modulo by zero takes place for all numeric
types

AssertionError Raised in case of failure of the Assert statement.

AttributeError Raised in case of failure of attribute reference or assignment.

EOFError Raised when there is no input from either the raw_input() or input()
function and the end of file is reached.

IndexError Raised when an index is not found in a sequence.

NameError Raised when an identifier is not found in the local or global


namespace.

SyntaxError Raised when there is an error in Python syntax.

IndentationError Raised when indentation is not specified properly.

SystemError Raised when the interpreter finds an internal problem, but when this
error is encountered the Python interpreter does not exit.

26
Chapter 10- Testing Concepts
10.1 Testing Fundamentals
Software testing can be stated as the process of verifying and validating that software or
application is bug-free, meets the technical requirements as guided by its design and
development, and meets the user requirements effectively and efficiently with handling all the
exceptional and boundary cases.
The process of software testing aims not only at finding faults in the existing software but also at
finding measures to improve the software in terms of efficiency, accuracy, and usability. It
mainly aims at measuring the specification, functionality, and performance of a software
program or application.
Different types of software testing-
1. Manual Testing: Manual testing includes testing software manually, i.e., without using any
automated tool or any script. In this type, the tester takes over the role of an end-user and tests
the software to identify any unexpected behavior or bug. There are different stages for manual
testing such as unit testing, integration testing, system testing, and user acceptance testing.
2. Automation Testing: Automation testing, which is also known as Test Automation, is when
the tester writes scripts and uses another software to test the product. This process involves the
automation of a manual process. Automation Testing is used to re-run the test scenarios that were
performed manually, quickly, and repeatedly.
There are seven principles in software testing:
1. Testing shows the presence of defects
2. Exhaustive testing is not possible
3. Early testing
4. Defect clustering
5. Pesticide paradox
6. Testing is context-dependent
7. Absence of errors fallacy

27
10.2 SDLC Models
Software Development life cycle (SDLC) is a spiritual model used in project management that
defines the stages included in an information system development project, from an initial
feasibility study to the maintenance of the completed application.

Each process model follows a series of phases unique to its type to ensure success in the step of
software development.

Waterfall Model

The waterfall is a universally accepted SDLC model. In this method, the whole process of
software development is divided into various phases.The waterfall model is a continuous
software development model in which development is seen as flowing steadily downwards (like
a waterfall) through the steps of requirements analysis, design, implementation, testing
(validation), integration, and maintenance.

RAD Model

RAD or Rapid Application Development process is an adoption of the waterfall model; it targets
developing software in a short period. The RAD model is based on the concept that a better
system can be developed in less time by using focus groups to gather system requirements.

Spiral Model

The spiral model is a risk-driven process model. This SDLC model helps the group to adopt
elements of one or more process models like a waterfall, incremental, waterfall, etc. The spiral
technique is a combination of rapid prototyping and concurrency in design and development
activities.

V-Model

In this type of SDLC model testing and the development, the step is planned in parallel. So, there
are verification phases on the side and the validation phase on the other side. V-Model joins by
Coding phase.

Incremental Model

The incremental model is not a separate model. It is necessarily a series of waterfall cycles. The
requirements are divided into groups at the start of the project. For each group, the SDLC model
is followed to develop software. The SDLC process is repeated, with each release adding more
functionality until all requirements are met. In this method, each cycle act as the maintenance
phase for the previous software release. Modification to the incremental model allows
development cycles to overlap. After that subsequent cycle may begin before the previous cycle
is complete.

28
Agile Model

Agile methodology is a practice which promotes continues interaction of development and


testing during the SDLC process of any project. In the Agile method, the entire project is divided
into small incremental builds. All of these builds are provided in iterations, and each iteration
lasts from one to three weeks.

Iterative Model

It is a particular implementation of a software development life cycle that focuses on an initial,


simplified implementation, which then progressively gains more complexity and a broader
feature set until the final system is complete. In short, iterative development is a way of breaking
down the software development of a large application into smaller pieces.

Big bang model

Big bang model is focusing on all types of resources in software development and coding, with
no or very little planning. The requirements are understood and implemented when they come.

29
10.3 Classification of Testing
1. Testing Classification By Project Process Phases.

1. Unit testing: This method is used to test a single subroutine in a program or a


code segment with independent functionality.
2. Integration testing: This method is based on unit tests. You need to assemble unit
modules into a system or subsystem, and then run the test. This method focuses on
checking whether the interface between the unit modules is correct or not.
3. System testing: This is a test of the entire product system, verifying that the
system meets the requirements specification. It also checks whether the
correctness and performance of the system meet the requirements or not.
4. Acceptance testing: This is the last operation before the software is to be
deployed. The purpose of this method is to ensure that the product is ready to be
delivered to the buyer. It makes sure that every function in this product meets the
user’s requirements.

Testing Classification By Source Code Visible Level.

1. Black box testing: Treat the software being tested as a black box. Only care about
the input data and the output data, do not care about the inner structure of the
software. It only checks whether the software’s function runs correctly and
consistent with the requirements specification or not. And whether the program
can properly receive the input data and produce the correct output data. The black
box focuses on the external structure of the program, regardless of the internal
logic structure. It is mainly used to check software interfaces and functions.
2. White box testing: The tester needs to step into the software source code, verify
every path in the code. Test the software according to the structure of the program.
Check whether the internal action of the product is carried out correctly or not
according to the design specification. Verify that each path in the program can
work correctly as expected.

10.4 Software Testing Techniques


Software testing techniques are the ways employed to test the application under test against the
functional or non-functional requirements gathered from business. Each testing technique helps
to find a specific type of defect. For example, Techniques which may find structural defects
might not be able to find the defects against the end-to-end business flow. Hence, multiple
testing techniques are applied in a testing project to conclude it with acceptable quality.

30
Types Of Software Testing Techniques

There are two main categories of software testing techniques:


1. Static Testing Techniques are testing techniques which are used to find defects in
Application under test without executing the code. Static Testing is done to avoid
errors at an early stage of the development cycle and thus reducing the cost of fixing
them.
2. Dynamic Testing Techniques are testing techniques that are used to test the dynamic
behavior of the application under test, that is by the execution of the code base. The
main purpose of dynamic testing is to test the application with dynamic inputs- some
of which may be allowed as per requirement (Positive testing) and some are not
allowed (Negative Testing).

10.5 Test Planning and Design

Test Planning
The test planning stage represents the need to review long–lead-time test planning activities.
During this phase, the test team identifies test procedure creation standards and guidelines;
hardware, software, and network required to support test environment; test data requirements; a
preliminary test schedule; performance measure requirements; a procedure to control test
configuration and environment; as well as defect-tracking procedures and associated tracking
tools.

The test plan contains the results of each preliminary phase of the structured test methodology
(ATLM). The test plan will define roles and responsibilities, project test schedule, test planning
and design activities, test environment preparation, test risks and contingencies, and acceptable
level of thoroughness (test acceptance criteria). Test plan appendices may include test
procedures, naming conventions, test procedure format standards, and a test procedure
traceability matrix.The test environment setup is part of test planning. It represents the need to
plan, track, and manage test environment setup activities, where material procurements may have
long lead times. The test team needs to schedule and track environment setup activities; install
test environment hardware, software, and network resources; integrate and install test
environment resources; obtain/refine test databases; and develop environment setup scripts and
test bed scripts.

Test Design

31
The test design component addresses the need to define the number of tests to be performed, the
ways that testing will be approached (paths, functions), and the test conditions that need to be
exercised. Test design standards need to be defined and followed.

An effective test program, incorporating the automation of software testing, involves a


mini-development lifecycle of its own, complete with strategy and goal planning, test
requirement definition, analysis, design, and coding. Similar to software application
development, test requirements must be specified before test design is constructed. Test
requirements need to be clearly defined and documented, so that all project personnel will
understand the basis of the test effort. Test requirements are defined within requirement
statements as an outcome of test requirement analysis.

10.6 Defect Management

A defect is an observed difference between the expectation or prediction and the actual outcome
of a test.
● Error: Human mistake; this action takes place prior to any faults and/or failures
● Fault: Results from an error. Fault is the view from inside the system. Fault is the state
where mistake or error exists. Developers will see the fault
● Failure: When the system is performing differently from the required behavior, from a
viewpoint outside the system. Users will see the failure.

The purpose of defect management for project or organization can be:

● Operational support for solving and retesting defects;


● Give input for status and progress reports;
● Give input for the release advice.
● Each defect can also be the trigger for development process improvement - what was the
reason that the defect occurred and can we prevent the defect from occuring in the future.

Stages of defect management-

● Defect Prevention
● Deliverable Baseline
● Defect Discovery
● Defect Resolution
● Process Improvement
● Management Reporting

32
10.7 Functional Testing

It is a type of software testing which is used to verify the functionality of the software
application, whether the function is working according to the requirement specification. In
functional testing, each function is tested by giving the value, determining the output, and
verifying the actual output with the expected value.

Types:

Unit Testing:Unit testing is usually performed by a developer who writes different code units
that could be related or unrelated to achieve a particular functionality. His, this usually entails
writing unit tests which would call the methods in each unit and validate those when the required
parameters are passed, and its return value is as expected.

Sanity Testing: Testing that is done to ensure that all the major and vital functionalities of the
application/system are working correctly. This is generally done after a smoke test.

Smoke Testing: Testing that is done after each build is released to test to ensure build stability. It
is also called build verification testing.

Regression Tests: Testing performed to ensure that adding new code, enhancements, fixing of
bugs is not breaking the existing functionality or causing any instability and still works according
to the specifications.

Integration Tests: When the system relies on multiple functional modules that might
individually work perfectly, but have to work coherently when clubbed together to achieve an
end to end scenario, validation of such scenarios is called Integration testing.

Beta/Usability Testing: Product is exposed to the actual customer in a production like an


environment and they test the product. The user’s comfort is derived from this and the feedback
is taken. This is similar to that of User Acceptance testing.

33
10.8 Non Functional Testing
Non-functional testing is a type of software testing to test non-functional parameters such as
reliability, load test, performance and accountability of the software. The primary purpose of
non-functional testing is to test the reading speed of the software system as per non-functional
parameters. The parameters of non-functional testing are never tested before the functional
testing.

Performance Testing: Performance Testing eliminates the reason behind the slow and limited
performance of the software. Reading speed of the software should be as fast as possible.For
Performance Testing, a well-structured and clear specification about expected speed must be
defined. Otherwise, the outcome of the test (Success or Failure) will not be obvious.

Load Testing: Load testing involves testing the system's loading capacity. Loading capacity
means more and more people can work on the system simultaneously.

Security Testing: Security testing is used to detect the security flaws of the software application.
The testing is done via investigating system architecture and the mindset of an attacker. Test
cases are conducted by finding areas of code where an attack is most likely to happen.

Portability Testing: The portability testing of the software is used to verify whether the system
can run on different operating systems without occurring any bug. This test also tests the
working of software when there is a same operating system but different hardware.

Accountability Testing: Accountability test is done to check whether the system is operating
correctly or not. A function should give the same result for which it has been created. If the
system gives expected output, it gets passed in the test otherwise failed.

Reliability Testing: Reliability test assumes that whether the software system is running without
fail under specified conditions or not. The system must be run for a specific time and number of
processes. If the system is failed under these specified conditions, reliability test will be failed.

Efficiency Testing: Efficiency test examines the number of resources needed to develop a
software system, and how many of these were used. It also includes the test of these three points.

34
Chapter 11- Unix Fundamental
11.1 Introduction
The Unix operating system is a set of programs that act as a link between the computer and the
user.
The computer programs that allocate the system resources and coordinate all the details of the
computer's internals is called the operating system or the kernel.
Users communicate with the kernel through a program known as the shell. The shell is a
command line interpreter; it translates commands entered by the user and converts them into a
language that is understood by the kernel.
● Unix was originally developed in 1969 by a group of AT&T employees Ken Thompson,
Dennis Ritchie, Douglas McIlroy, and Joe Ossanna at Bell Labs.
● There are various Unix variants available in the market. Solaris Unix, AIX, HP Unix and
BSD are a few examples. Linux is also a flavor of Unix which is freely available.
● Several people can use a Unix computer at the same time; hence Unix is called a
multiuser system.
● A user can also run multiple programs at the same time; hence Unix is a multitasking
environment.
The main concept that unites all the versions of Unix is the following four basics −
● Kernel − The kernel is the heart of the operating system. It interacts with the hardware
and most of the tasks like memory management, task scheduling and file management.
● Shell − The shell is the utility that processes your requests. When you type in a command
at your terminal, the shell interprets the command and calls the program that you want.
The shell uses standard syntax for all commands. C Shell, Bourne Shell and Korn Shell
are the most famous shells which are available with most of the Unix variants.
● Commands and Utilities − There are various commands and utilities which you can make
use of in your day to day activities. cp, mv, cat and grep, etc. are few examples of
commands and utilities. There are over 250 standard commands plus numerous others
provided through 3rd party software. All the commands come along with various options.
● Files and Directories − All the data of Unix is organized into files. All files are then
organized into directories. These directories are further organized into a tree-like
structure called the filesystem.

35
11.2 Unix Backup Tools
The Unix Backup Tool (UBT) is a tool written in Tcl/Tk and using Expect to control interactive
commands like dump. It allows you to define automatically from templates descriptions the files
system list to backup, and with a nice interface to change the options and follow the backup
progress.
The motivation for UBT arose, as software often does, from frustration. My first impulse was to
search the web for an existing backup tool, but the softwares I found, was either commercial or
do not correspond to my needs:

● A simple and nice graphic interface to configure and follow the backup.
● Create automatically the machines and file systems list to backup.
● Perform a full backup on tapes but also an incremental backup with no special human
action.
● Allow to limit the file system list with restrictions like backup all FS with /export/home
prefix.
● Perform tape action.
● Detect unreachable machines and do not block the backup process.

Steps to use-

1. Edit the template files


2. Execute the backtool command.
3. In the interface select the type of the backup you want to perform.
4. type Configuration in the menu, and wait for the option window.
5. Check and Save the configuration
6. type Run command.

11.3 Vi Editor
The vi editor is elaborated as a visual editor. It is installed in every Unix system. In other words,
it is available in all Linux distros. It is user-friendly and works the same on different distros and
platforms. It is a very powerful application. An improved version of vi editor is vim.

The vi editor has two modes:

● Command Mode: In command mode, actions are taken on the file. The vi editor starts in
command mode. Here, the typed words will act as commands in the vi editor. To pass a
command, you need to be in command mode.

● Insert Mode: In insert mode, entered text will be inserted into the file. The Esc key will
take you to the command mode from insert mode.

36
Using vi

The vi editor tool is an interactive tool as it displays changes made in the file on the screen while
you edit the file.

In vi editor you can insert, edit or remove a word as the cursor moves throughout the
file.Commands are specified for each function like to delete it's x or dd.

The vi editor is case-sensitive. For example, p allows you to paste after the current line while P
allows you to paste before the current line.

Commands Action

:wq Save and quit

:w Save

:q Quit

:w fname Save as fname

ZZ Save and quit

:q! Quit discarding changes made

:w! Save (and write to non-writable file)

37
Chapter 12-Unix Shell Scripting
12.1 Introduction
A shell script is a computer program designed to be run by the Unix/Linux shell which could be
one of the following:
● The Bourne Shell
● The C Shell
● The Korn Shell
● The GNU Bourne-Again Shell
A shell is a command-line interpreter and typical operations performed by shell scripts include
file manipulation, program execution, and printing text.

Shell Prompt
The prompt, $, which is called the command prompt, is issued by the shell. While the prompt is
displayed, you can type a command.
Shell reads your input after you press Enter. It determines the command you want executed by
looking at the first word of your input. A word is an unbroken set of characters. Spaces and tabs
separate words.

Shell Scripts
The basic concept of a shell script is a list of commands, which are listed in the order of
execution. A good shell script will have comments, preceded by # sign, describing the steps.
There are conditional tests, such as value A is greater than value B, loops allowing us to go
through massive amounts of data, files to read and store data, and variables to read and store
data, and the script may include functions.
We are going to write many scripts in the next sections. It would be a simple text file in which
we would put all our commands and several other required constructs that tell the shell
environment what to do and when to do it.
Shell scripts and functions are both interpreted. This means they are not compiled.

12.2 Variables and Operators


A variable is a character string to which we assign a value. The value assigned could be a
number, text, filename, device, or any other type of data.
A variable is nothing more than a pointer to the actual data. The shell enables you to create,
assign, and delete variables.

38
The name of a variable can contain only letters (a to z or A to Z), numbers ( 0 to 9) or the
underscore character ( _).

Variable Types
● Local Variables − A local variable is a variable that is present within the current instance
of the shell. It is not available to programs that are started by the shell. They are set at the
command prompt.
● Environment Variables − An environment variable is available to any child process of the
shell. Some programs need environment variables in order to function correctly. Usually,
a shell script defines only those environment variables that are needed by the programs
that it runs.
● Shell Variables − A shell variable is a special variable that is set by the shell and is
required by the shell in order to function correctly. Some of these variables are
environment variables whereas others are local variables.

Operators:
There are various operators supported by each shell. We will discuss in detail about the Bourne
shell (default shell) in this chapter.
We will now discuss the following operators −
● Arithmetic Operators
● Relational Operators
● Boolean Operators
● String Operators
● File Test Operators

10.3 Advanced Features


1. Multiuser System :
Unix provides multiple programs to run and compete for the attention of the CPU. This happens
in 2 ways :
● Multiple users running multiple jobs
● Single user running multiple jobs

In UNIX, resources are actually shared between all the users, a so-called multi-user system. For
doing so, computers give a time slice (breaking unit of time into several segments ) to each user.
So, at any instant of time, only one user is served but the switching is so fast that it gives an
illusion that all the users are served simultaneously.

39
2. Multitask System :
A single user may run multiple tasks concurrently. Example : Editing a file, printing another on
the printer & sending email to a person, and browsing the net too at the same time. The Kernel is
designed to handle user’s multiple needs.
The important thing here is that only one job can be seen running in the foreground, the rest all
seem to run in the background. Users can switch between them, terminate/suspend any of the
jobs.
3. The Building-Block Approach :
The Unix developers thought about keeping small commands for every kind of work. So Unix
has so many commands, each of which performs one simple job only. You can use 2 commands
by using pipes (‘|’). Example : $ ls | wc Here, | (pipe) connects 2 commands to create a pipeline.
This command counts the number of files in the directory. These types of connected commands
that can filter/manipulate data in other ways are called filters.
Nowadays, many UNIX tools are designed in a way that the output of 1 can be used as an input
for the others.. We can create a large number of combinations by connecting a number of tools.
4. The UNIX Toolkit :
Unix has a kernel but the kernel alone can’t do much that could help the user. So, we need to use
the host of applications that usually come along with the UNIX systems. The applications are
quite diversified. General-purpose tools, text manipulation utilities (called filters), compilers and
interpreters, networked programs, and system administration tools are all included. With every
UNIX release, new tools are being added and the older ones are modified/ removed.
5. Pattern Matching :
Unix provides very sophisticated pattern matching features. The meta-char ‘*’ is a special
character used by the system to match a number of file names. There are several other
meta-chars in UNIX. The matching is not confined to only filename. Advanced tools use a
regular expression that is framed with the characters from this set.
6. Programming Facility :
Unix provides shell which is also a programming language designed for programmers, not for
casual end-users. It has all the control structures, loops, and variables required for programming
purposes. These features are used to design the shell scripts ( programs that can invoke the UNIX
commands).Many functions of the system can be controlled and managed by these shell scripts.
7. Documentation :
It has a ‘man’ command that stands for the manual, which is the most important reference for
any commands and their configuration files. Apart from the online documentation, there is a vast
amount of resources available on the Internet. If you’re stuck with a problem, there are various
UNIX newsgroups where you can post your concerns. You can also go through the
FAQ(Frequently Asked Questions) – a document that addresses several problems is widely used
& available on the Net.

40
Chapter 13- Networking Fundamentals
13.1 Introduction
A Computer Network is defined as a set of two or more computers that are linked
together.Computer Networks are built using a collection of hardware (such as routers, switches,
hubs, and so forth) and networking software (such as operating systems, firewalls, or corporate
applications).

Below are the most common computer network types that are frequently used these days:

● LAN [Local Area Network}

● WLAN [Wireless local area network]

● CAN [Campus Area Network]

● MAN [Metropolitan Area Network]

● PAN [Personal Area Network]

● SAN [Storage Area Network]

● VPN [Virtual Private Network]

● WAN [ Wide Area Network]

13.2 Network Media and devices


Network media is the actual path over which an electrical signal travels as it moves from one
component to another. Devices can exchange information along various media, physically
(wired) and wirelessly.
1. Wired Connections
Example: Twisted pair cable, Coaxial cable etc
2. Fiber optics cables
3. Wireless Connections
Example: Wi-Fi, Bluetooth etc

Hardware devices that are used to connect computers, printers, fax machines and other electronic
devices to a network are called network devices. These devices transfer data in a fast, secure and
correct way over the same or different networks. Network devices may be inter-network or
intra-network.

41
Modem
Modem is a device that enables a computer to send or receive data over telephone or cable lines.
The data stored on the computer is digital whereas a telephone line or cable wire can transmit
only analog data.

Ethernet Card
Ethernet card, also known as network interface card (NIC), is a hardware component used by
computers to connect to Ethernet LAN and communicate with other devices on the LAN. The
earliest Ethernet cards were external to the system and needed to be installed manually. In
modern computer systems, it is an internal hardware component.

Router
A router is a network layer hardware device that transmits data from one LAN to another if both
networks support the same set of protocols. So a router is typically connected to at least two
LANs and the internet service provider (ISP). It receives its data in the form of packets, which
are data frames with their destination address added. Router also strengthens the signals before
transmitting them. That is why it is also called a repeater.

Switch
Switch is a network device that connects other devices to Ethernet networks through twisted
pair cables. It uses packet switching techniques to receive, store and forward data packets on the
network. The switch maintains a list of network addresses of all the devices connected to it.

Wi-Fi Card
Wi-Fi is the acronym for wireless fidelity. Wi-Fi technology is used to achieve wireless
connection to any network. A Wi-Fi card is a card used to connect any device to the local
network wirelessly. The physical area of the network which provides internet access through
Wi-Fi is called Wi-Fi hotspot.

13.3 IP Address and SubNet Mask


The IP addresses are the unique identifiers of network devices used to establish communication,
send, and receive data to or from other computers or devices in the same network or on the
internet.
At present, there are two relevant standards for IP (Internet Protocol) addresses: IP version 4
(IPv4) and IP version 6 (IPv6).
An IP address can be either static or dynamic. A static IP address is one that you need to
configure yourself through the Windows network settings. A dynamic address is assigned by the
Dynamic Host Configuration Protocol (DHCP), usually for a limited time frame.

42
A subnet mask is a way to divide an IP network. You can think of it as the area code of your

phone number. In simple terms, subnet masks are used in networks to split them into two or more

subnetworks, making them easier to manage. On home networks and small business networks,

all your network computers and devices are usually on the same subnet, so all the computers or

devices located on the same subnet have the same subnet mask.

To get a little more technical, a subnet mask is a 32-bit number that masks an IP address and

divides the IP address into a network address and host address. The subnet mask is made by

setting network bits to all "1" and setting host bits to all "0".

The subnet mask can be represented in two ways: one is the usual dot-decimal notation like an IP
address, and the second is using the CIDR notation.
11000000.10101000.01111011.10000100 -- IP address (192.168.123.132)

11111111.11111111.11111111.00000000 -- Subnet mask (255.255.255.0)

The first 24 bits are identified as the network address, with the last 8 bits (the remaining zeros
in the subnet mask) identified as the host address. This gives you the following:

11000000.10101000.01111011.00000000 -- Network address (192.168.123.0)

00000000.00000000.00000000.10000100 -- Host address (000.000.000.132)

13.4 OSI Model

OSI stands for Open System Interconnection is a reference model that describes how
information from a software application in one computer moves through a physical medium to
the software application in another computer.OSI consists of seven layers, and each layer
performs a particular network function.

There are the seven OSI layers:Physical Layer, Data-Link Layer, Network Layer, Transport
Layer, Session Layer, Presentation Layer, Application Layer

43
44
Chapter 14- Project ( E-Commerce App)

14.1 Introduction (Shopzee Store )

Shopzee Store is a professional WooCommerce WordPress theme that is evaluated with clean
and elegant design. It surely fits any eCommerce WordPress store from electronics store, digital
shop, hitech store, fashion store, grocery store, beauty shop to baby shop.

Shopzee Store is updated with new homepage demos, color schemes, new functions and latest
technologies that fulfill users’ needs. With elegant homepage layouts, unlimited color schemes,
multiple headers & footer styles, you are free to switch elements between homepages and use
any multi-store just in minutes.It is not only about a beautiful design, but also about a fully
functional theme that focuses on user experience and usability with a huge number of awesome
features.

It is made up by using Pycharm and Flask and have following pages-

45
14.2 Registration page

The registration page of the website consists of a registration form that lets website users get
registered with the website and get access to applicable facilities, services, or products.

14.3 Login Page

For login protected sites, the login page is the very first page to show the users. Login page is
attractive, user-friendly, and easy to use.

46
14.4 Website Interface

Web user interface allows the user to interact with content or software running on a remote
server through a Web browser. The products of the Web page are shown on the screen and the
client can choose the desired product.

14.5 Shopping Cart

The shopping cart page is designed to allow buyers to see all the products they have added to the
shopping cart. It contains a detailed list of products and their prices, and is the last stop before
customers order and pay.

47
14.6 Shopping History

The shopping history page is designed to allow buyers to see all the products they have
purchased till now. It contains a detailed list of products and their prices, and it can store the data
of the last 10 purchases.

48
Reference
1. Svilen Dimitrov, Harald Haas. “Principles of Product Testing" : Cambridge University
Press, 2015

2. M. Afgani, H. Haas, H. Elgala, and D. Knipp(2006,March) “Models of Product Testing” .


Proc. of the 2nd International Conference on Testbeds and Research Infrastructures for
the Development of Networks and Communities (TRIDENTCOM), Barcelona, Spain

3. D. Tsonev, S. Sinanović, and H. Haas(2011,Dec) “Basics of Python”. Proc. Of IEEE


Global Conference (IEEE GLOBECOM 2011), Houston, Texas, USA

4. M. Di Renzo, H. Haas, and P.M. Grant(2011,Nov)“Python: A Survey”, IEEE


Communications Magazine, vol. 49

5. H. Elgala, R. Mesleh, and H. Haas, “Data Structure: Potential and State-of-the- Art”,
IEEE Communications Magazine, vol. 49, no. 9, pp. 56-62, Sep. 2011, ISSN: 0163-6804.

6. International Journal of Applied Engineering Research, ISSN 0973-4562 Vol.7 No.11


(2012)

7. Ravi Prakash, Prachi Agarwal(2014,Feb) “The New Era of Unix Fundamental”,


International Journal of Advanced Research in Computer Engineering &Technology
(IJARCET) Volume 3

8. R.Karthika, S.Balakrishnan(2015,March) “Networking Technology” SSRG International


Journal Engineering (SSRG-IJECE) volume 2

9. Mohammad Noshad, Member, IEEE, and Ma¨ıt´e Brandt-Pearce, Senior Member, IEEE
“Command Line Arguments”

10. Ekta, Ranjeet Kaur Light(2014,April) “Website Development” International Journal of


Computer Science and Mobile Computing Vol. 3

11. Wipro- PBL app

49

You might also like