0% found this document useful (0 votes)
35 views11 pages

Software Testing Tutorial - New

xxxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxz

Uploaded by

John Son
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views11 pages

Software Testing Tutorial - New

xxxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxzxz

Uploaded by

John Son
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 11

Software Testing

Software testing is an integral part of Software Development Life Cycle. Testing software or any product in day-to-day
business applications or in our daily routine work becomes necessary as going around with these, will mess up
things.
Software Development Life Cycle SDLC! is a procedural process, in the development of a software product. The
process is carried in a set of steps, which e"plains the whole idea about how to go through each product.
The classification of Software Development Life Cycle process is as follows
#. $lanning
%. &nalysis
'. Design
(. Software Development
). *mplementation
+. Software Testing
,. Deployment
-. .aintenance
Software Testing is an important factor in a product/s life cycle, as the product will have greater life, only when it
works correctly and efficiently according to the customer/s re0uirements.

Introduction to Software Testing
1efore moving further towards introduction to software testing, we need to know a few concepts that will simplify the
definition of software testing.
Error2 3rror or mistake is a human action that produces wrong or incorrect result.
Defect (Bug, Fault)2 & flaw in the system or a product that can cause the component to fail or misfunction.
Failure2 *t is the variance between the actual and e"pected result.
Risk2 4isk is a factor that could result in negativity or a chance of loss or damage.
Thus Software testing is the process of finding defects5bugs in the system, which occurs due to an error in the
application, which could lead to failure of the resultant product and increase in probability of high risk. *n short,
software testing has different goals and ob6ectives, which often include2
#. finding defects7
%. gaining confidence in and providing information about the level of 0uality7
'. $reventing defects.
*f you are new to the field of software testing, then the article software testing for beginners will be of great help.
Scope of Software Testing
The primary function of software testing is to detect bugs in order to correct and uncover it. The scope of software
testing includes e"ecution of that code in various environment and also to e"amine the aspects of code - does the
software do what it is supposed to do and function according to the specifications8 &s we move further we come
across some 0uestions such as 9:hen to start testing89 and 9:hen to stop testing89 *t is recommended to start
testing from the initial stages of the software development. This not only helps in rectifying tremendous errors before
the last stage, but also reduces the rework of finding the bugs in the initial stages every now and then. *t also saves
the cost of the defect re0uired to find it. Software testing is an ongoing process, which is potentially endless but has
to be stopped somewhere, due to the lack of time and budget. *t is re0uired to achieve ma"imum profit with good
0uality product, within the limitations of time and money. The tester has to follow some procedural way through which
he can 6udge if he covered all the points re0uired for testing or missed out any. To help testers to carry out these day-
to-day activities, a baseline has to be set, which is done in the form of checklists. 4ead more on checklists for
software tester.
Software Testing Key oncepts
Defects and Failures! &s we discussed earlier, defects are not caused only due to the coding errors, but most
commonly due to the re0uirement gaps in the non-functional re0uirement, such as usability, testability, scalability,
maintainability, performance and security. & failure is caused due to the deviation between an actual and an
e"pected result. 1ut not all defects result to failures. & defect can turn into a failure due to the change in the
environment and or the change in the configuration of the system re0uirements.
Input o"#ination and $reconditions! Testing all combination of inputs and initial state preconditions!, is not
feasible. This means finding large number of infre0uent defects is difficult.
Static and Dyna"ic %nalysis! Static testing does not re0uire e"ecution of the code for finding defects, whereas
in dynamic testing, software code is e"ecuted to demonstrate the results of running tests.
&erification and &alidation! Software testing is done considering these two factors.
#. ;erification2 This verifies whether the product is done according to the specification8
%. ;alidation2 This checks whether the product meets the customer re0uirement8
Software 'uality %ssurance! Software testing is an important part of the software 0uality assurance. <uality
assurance is an activity, which proves the suitability of the product by taking care of the 0uality of a product and
ensuring that the customer re0uirements are met.
Software Testing Types!
Software test type is a group of test activities that are aimed at testing a component or system focused on a specific
test ob6ective7 a non-functional re0uirement such as usability, testability or reliability. ;arious types of software testing
are used with the common ob6ective of finding defects in that particular component.
Software testing is classified according to two basic types of software testing2 .anual Scripted Testing and
&utomated Testing.
(anual Scripted Testing2
Black Bo) Testing
*+at is a Black Bo) Testing Strategy,
1lack 1o" Testing is not a type of testing7 it instead is a testing strategy, which does not need any knowledge of
internal design or code etc. &s the name 9black bo"9 suggests, no knowledge of internal logic or code structure is
re0uired. The types of testing under this strategy are totally based5focused on the testing for re0uirements and
functionality of the work product5software application. 1lack bo" testing is sometimes also called as 9=pa0ue
Testing9, 9>unctional51ehavioral Testing9 and -losed Bo) Testing-.
The base of the 1lack bo" testing strategy lies in the selection of appropriate data as per functionality and testing it
against the functional specifications in order to check for normal and abnormal behavior of the system. ?ow a days, it
is becoming common to route the Testing work to a third party as the developer of the system knows too much of the
internal logic and coding of the system, which makes it unfit to test the application by the developer.
*n order to implement 1lack 1o" Testing Strategy, the tester is needed to be thorough with the re0uirement
specifications of the system and as a user, should know, how the system should behave in response to the particular
action.
;arious testing types that fall under the 1lack 1o" Testing strategy are2 functional testing, stress testing, recovery
testing, volume testing, @ser &cceptance Testing also known as @&T!, system testing, Sanity or Smoke testing, load
testing, @sability testing, 3"ploratory testing, ad-hoc testing, alpha testing, beta testing etc.
These testing types are again divided in two groups2 a! Testing in which user plays a role of tester and b! @ser is not
re0uired
*+ite Bo) Testing
*+at is a *+ite Bo) Testing Strategy,
:hite bo" testing strategy deals with the internal logic and structure of the code. :hite bo" testing is also called as
glass, structural, open bo" or clear bo" testing. The tests written based on the white bo" testing strategy incorporate
coverage of the code written, branches, paths, statements and internal logic of the code etc.
*n order to implement white bo" testing, the tester has to deal with the code and hence is needed to possess
knowledge of coding and logic i.e. internal working of the code. :hite bo" test also needs the tester to look into the
code and find out which unit5statement5chunk of the code is malfunctioning.
%d/antages of *+ite #o) testing are!
0. &s the knowledge of internal coding structure is prere0uisite, it becomes very easy to find out which type of
*nput5data can help in testing the application effectively.
1. The other advantage of white bo" testing is that it helps in optimiAing the code
2. *t helps in removing the e"tra lines of code, which can bring in hidden defects.
Disad/antages of w+ite #o) testing are!
#. &s knowledge of code and internal structure is a prere0uisite, a skilled tester is needed to carry out this type
of testing, which increases the cost.
%. &nd it is nearly impossible to look into every bit of code to find out hidden errors, which may create
problems, resulting in failure of the application.
3ray Bo) Testing
Brey bo" testing involves having access to internal data structures and algorithms for purposes of designing the test
cases, but testing at the user, or black-bo" level. .anipulating input data and formatting output do not 0ualify as grey
bo", because the input and output are clearly outside of the 9black-bo"9 that we are calling the system under test.
This distinction is particularly important when conducting integration testing between two modules of code written by
two different developers, where only the interfaces are e"posed for test. Cowever, modifying a data repository does
0ualify as grey bo", as the user would not normally be able to change the data outside of the system under test. Brey
bo" testing may also include reverse engineering to determine, for instance, boundary values or error messages.
T+e le/els of software testing life cycle includes!
@nit Testing
*ntegration Testing
System Testing
&cceptance Testing
#. &lpha Testing
%. 1eta Testing
4t+er types of software testing are!
>unctional Testing
$erformance Testing
#. Load Testing
%. Stress Testing
Smoke Testing
Sanity Testing
4egression Testing
4ecovery Testing
@sability Testing
Compatibility Testing
Configuration Testing
3"ploratory Testing
>or further e"planation of these concepts, read more on types of software testing.
%uto"ated Testing! .anual testing is a time consuming process. &utomation testing involves automating a manual
process. Test automation is a process of writing a computer program in the form of scripts to do a testing which would
otherwise need to be done manually. Some of the popular automation tools are :inrunner, <uick Test $rofessional
<T$!, Load4unner, SilkTest, 4ational 4obot, etc. &utomation tools category also includes maintenance tool such as
TestDirector and many other.
Software Testing (et+odologies
The software testing methodologies or process includes various models that built the process of working for a
particular product. These models are as follows2
:aterfall .odel
; .odel
Spiral .odel
4ational @nified $rocess4@$!
&gile .odel
4apid &pplication Development4&D!
These models are elaborated briefly in software testing methodologies.
Software Testing %rtifacts
Software testing process can produce various artifacts such as2
Test $lan2 & test specification is called a test plan. & test plan is documented so that it can be used to verify
and ensure that a product or system meets its design specification.
Tracea#ility "atri)2 This is a table that correlates or design documents to test documents. This verifies that
the test results are correct and is also used to change tests when the source documents are changed.
Test ase2 Test cases and software testing strategies are used to check the functionality of individual
component that is integrated to give the resultant product. These test cases are developed with the ob6ective
of 6udging the application for its capabilities or features.
Test Data2 :hen multiple sets of values or data are used to test the same functionality of a particular feature
in the test case, the test values and changeable environmental components are collected in separate files
and stored as test data.
Test Scripts2 The test script is the combination of a test case, test procedure and test data.
Test Suite2 Test suite is a collection of test cases.
Software Testing $rocess
Software testing process is carried out in the following se0uence, in order to find faults in the software system2
#. Create Test $lan
%. Design Test Case
'. :rite Test Case
(. 4eview Test Case
). 3"ecute Test Case
+. 3"amine Test 4esults
,. $erform $ost-mortem 4eviews
-. 1udget after 3"perience
Cere is a sample Test Case for you2
5 Software Test ase for 6ogin $age!
$urpose2 The user should be able to go to the Come page.
$re7re8uisite2
#. S5w should be compatible with the =perating system.
%. Login page should appear.
'. @ser *d and $assword te"tbo"es should be available with appropriate labels.
(. Submit and Cancel buttons with appropriate captions should be available.
Test Data2 4e0uired list of variables and their values should be available.eg2 @ser *d2D;alid
@ser*d, *nvalid @ser*d, emptyE, $assword2D;alid, *nvalid, emptyE.
Software Testing - Test Cases
:hat are test cases in software testing, how they are designed and why they are so important to the entire testing
scenario, read through to know more..
*+at is a Test ase,
& test case is a set of conditions or variables and inputs that are developed for a particular goal or ob6ective to be
achieved on a certain application to 6udge its capabilities or features.
*t might take more than one test case to determine the true functionality of the application being tested. 3very
re0uirement or ob6ective to be achieved needs at least one test case. Some software development methodologies
like 4ational @nified $rocess 4@$! recommend creating at least two test cases for each re0uirement or ob6ective7
one for performing testing through positive perspective and the other through negative perspective.
Test ase Structure
& formal written test case comprises of several parts -
#. Infor"ation
*nformation consists of general information about the test case. *nformation incorporates *dentifier, test case
creator, test case version, name of the test case, purpose or brief description and test case dependencies.
%. %cti/ity
&ctivity consists of the actual test case activities. &ctivity contains information about the test case
environment, activities to be done at test case initialiAation, activities to be done after test case is performed,
step by step actions to be done while testing and the input data that is to be supplied for testing.
'. Results
4esults are outcomes of a performed test case. 4esults data consist of information about e"pected results
and the actual results.
Designing Test ases
Test cases should be designed and written by someone who understands the function or technology being tested. &
test case should include the following information -
$urpose of the test
Software re0uirements and Cardware re0uirements if any!
Specific setup or configuration re0uirements
Description on how to perform the tests!
3"pected results or success criteria for the test
Designing test cases can be time consuming in a testing schedule, but they are
worth giving time because they can really avoid unnecessary retesting or
debugging or at least lower it. Organizations can take the test cases approach in
their own context and according to their own perspectives. Some follow a general
step way approach while others may opt for a more detailed and complex approach.
It is very important for you to decide between the two extremes and udge on what
would work the best for you. Designing proper test cases is very vital for your
software testing plans as a lot of bugs, ambiguities, inconsistencies and slip ups can
be recovered in time as also it helps in saving your time on continuous debugging
and re!testing test cases.
9ote! Refer to t+e #ellow sa"ple test case.
Test ase :0
Test =b6ectives To test whether the name field accepts numbers
Test Data %0::
3"pected 4esults
&n 3rror message should appear stating that the data entry is
unsuccessful
&ctual 4esults &n error message appeared
Conclusion &ctual results matched e"pected results.
Test $lan
Sr.9o Test ase Id Test ase 9a"e Steps;%ction E)pected Results
#. TC#. Checking @ser
*nterface
re0uirements.
@ser views the page to check whether it includes
@ser*d and $assword te"tbo"es with appropriate
labels. &lso e"pects that Submit and Cancel buttons
are available with appropriate captions
Screen displays user interface
re0uirements according to the
user.
%. TC%. Te"tbo" for @ser*d
should2
i! @ser types numbers into the te"tbo". i! 3rror message is displayed
for numeric data.
i!allow only alpha-
numeric
charactersDa-A, &-
FE
ii!not allow special
characters
likeD/G/,/H/,/I/,/J/,/K/,...E
iii!not allow numeric
characters likeDL-ME
ii! @ser types alphanumeric data in the te"tbo". ii! Te"t is accepted when user
enters alpha-numeric data into
the te"tbo".
'. TC'. Checking
functionality of the
$assword te"tbo"2
i!Te"tbo" for
$assword should
accept more than
si" characters.
ii!Data should be
displayed in
encrypted format.
i! @ser enters only two characters in the password
te"tbo".
i! 3rror message is displayed
when user enters less than si"
characters in the password
te"tbo".
ii! @ser enters more than si" characters in the
password te"tbo".
System accepts data when
user enters more than si"
characters into the password
te"tbo".
ii! @ser checks whether his data is displayed in the
encrypted format.
System accepts data in the
encrypted format else displays
an error message.
(. TC(. Checking
functionality of
/S@1.*T/ button.
i! @ser checks whether /S@1.*T/ button is enabled
or disabled.
i!System displays /S@1.*T/
button as enabled
ii! @ser clicks on the /S@1.*T/ button and e"pects to
view the /Come/ page of the application.
ii! System is redirected to the
/Come/ page of the application
as soon as he clicks on the
/S@1.*T/ button.
). TC). Checking
functionality of
/C&?C3L/ button.
i! @ser checks whether /C&?C3L/ button is enabled
or disabled.
i! System displays /C&?C3L/
button as enabled.
ii! @ser checks whether the te"tbo"es for @ser*d
and $assword are reset to blank by clicking on the
/C&?C3L/ button.
ii! System clears the data
available in the @ser*d and
$assword te"tbo" when user
clicks on the /C&?C3L/ button.
Fault Finding Tec+ni8ues in Software Testing
>inding of a defect or fault in the earlier parts of the software not only saves time and money, but is also efficient in
terms of security and profitability. &s we move forward towards the different levels of the software, it becomes difficult
and tedious to go back for finding the problems in the initial conditions of the components. The cost of finding the
defect also increases. Thus it is recommended to start testing from the initial stages of the life cycle.
There are various techni0ues involved along with the types of software testing. There is a procedure that is to be
followed for finding a bug in the application. This procedure is combined into the life cycle of the bug in the form of
contents of a bug, depending upon the severity and priority of that bug. This life cycle is named as the bug life cycles,
which helps the tester in answering the 0uestion - how to log a bug8
(easuring Software Testing
There arises a need of measuring the software, both, when the software is under development and after the system
is ready for use. Though it is difficult to measure such an abstract constraint, it is essential to do so. The elements
that are not able to be measured, needs to be controlled. There are some important uses of measuring the software2
Software metrics helps in avoiding pitfalls such as
#. cost overruns,
%. in identifying where the problem has raised,
'. Clarifying goals.
*t answers 0uestions such as2
#. :hat is the estimation of each process activity8
%. Cow is the 0uality of the code that has been developed8
'. Cow can the under developed code be improved8 etc .
*t helps in 6udging the 0uality of the software, cost and effort estimation, collection of data,
productivity and performance evaluation.
So"e of t+e co""on software "etrics are!
Code Coverage
Cyclomatic comple"ity
Cohesion
Coupling
>unction $oint &nalysis
3"ecution time
Source lines of code
1ug per lines of code
*n short, measurement of software is for understanding, controlling and improvement of the software system.
Software is sub6ect to changes, with respect to, changing environmental conditions, varying user re0uirements, as
well as configuration and compatibility issues. This gives rise to the development of newer and updated versions of
software. 1ut, there should be some source of getting back to the older versions easily and working on them
efficiently. Testers play a vital role in this. Cere is where change management comes into picture.
Software Testing ertifications
Software testing certifications will not only boost up ones knowledge, but also prove to be beneficial for his academic
performance. There are some software testing certification programs that can support the professional aspirations of
software testers and 0uality assurance specialists.
*ST<1- *nternational Software Testing <ualifications 1oard
CST3- Certified Software Tester
CST$- Certified Software Test $rofessional
CT.- Certified Test .anager
CS$.- Certified Software $ro6ect .anager
CS$3- Certified Software $rocess 3ngineer
C&ST- Certified &ssociate in Software Testing
Quality Assurance Certifications2
CS<&- Certified Software <uality &nalyst
Software <uality &ssurance Certification
CS<3- Certified Software <uality 3ngineer
C<*&- Certified <uality *mprovement &ssociate
Software testing is indeed a vast field and accurate knowledge is crucial to ensure the 0uality of the software
developed. * consider that this article on software testing tutorial must have given you a clearer idea on various
software testing types, methodologies and different software testing strategies.

You might also like