SVVT File
SVVT File
4 Take any system (e.g. ATM system) and study its system 14
specifications and report the various bugs.
Index
Page |1
Experiment-1
Objective:
A program written in c language for matrix multiplication fails ―Introspect the causes for its
failure and write down the possible reasons for its failure.
Program logic:
1. Read the no. of rows (r1) and cols (c1) of a matrix a[3][3].
2. Read the no. of rows (r2) and cols. (c2) of matrix b[3][3].
3. If c1=r2 then display matrix multiplication is possible otherwise display impossible
4. If c1=r2 then read the elements into both the matrices a andb.
5. Initialize a resultant matrix c[3][3] with 0.
6. Calculate c[i][j] = c[i][j] + a[i][k] * b[k][j].
7. Display the resultant matrix
Procedure:
1. Create : Open editor vi x.c write a program after that press ESC and: wq for save and
Quit.
2. Compile: gcc x.c.
3. Execute: . / a.out.
Source code :
#include<stdio.h>
#include<conio.h>
void main()
{
int a[3][3],b[3][3],c[3][3],i,j,k,m,n,p,q;
clrscr();
printf(―Enter matrix no.of rows & cols);
scanf(―%d%d‖,&m,&n);
printf(― Enter 2matrix no.of rows & cols‖) ;
scanf(―%d%d‖,&p,&q);
printf("\n enter the matrix elements"); for(i=0;i<m;i++)
{
for(j=0;j<n;j++)
{
scanf("%d",&a[i][j]);
}
}
Page |2
Test cases:
Test case no: 1
Test case name: Equal no. of rows & cols
Input Expected output Actual output Remarks
Matrix1 rows & cols= 3
3
Matrix2 rows & cols= 3
3
Matrix1:
111 333 333
111 3 3 3 3 3 3 Success
111
Matrix2: 333 333
111
111
111
Experiment-2
Objective
Write programs in C- Language to demonstrate the working of the following a. constructs: i)
do.. .while ii) while….do iii) if…else iv) switch v) for
Program logic:
1. do …while
declare i,
intialize n to 5 and j to 0.
read i value .
loop :
if (i%2== 0)
print i as even number. And increment i and j value.
otherwise print i as odd number . and increment i and j value .
if i>0 and j<n go to loop
2. while
declare i,
intialize n to 5 and j to 0.
read i value .
loop : if i>0 and j<n.
if i%2 == 0 print i as even number and increment i and j value.
otherwise print i as odd number and increment i and j value .
go to loop
3. if….else
declare i value.
read i value .
if i%2== 0 print i as even number.
otherwise odd number.
4. switch
declare a,b,c.
read i value.
print enter a,b values .
read a,b values . switch ( case value = i)
if case value = 1
c is sum of a and b
if case value =2
Page |5
c is difference of a and b
if case value = 3
c is multiplication of a and b.
if case value = 4
c is division of a and b .
5. for loop
declare i value.
read i value .
loop initialize i to 1 if i<=5
print i as even number
else
print as odd number.
increment i value
Procedure:
1. Create : Open editor vi x.c write a program after that press ESC and: wq for save and
Quit.
2. Compile: gcc x.c.
3. Execute: . / a.out.
Source code:
1. do…while
#include <stdio.h>
void main ()
{
int i, n=5,j=0;
printf(“enter a no”);
scanf(“%d”,&i);
do
{ if(i%2== 0)
{
rintf("%d", i);
printf("is a even no.");
i++;
j++;
}
else
{
printf("%d", i);
Page |6
2. while
#include<stdio.h>
#include <conio.h>
void main ()
{
int i,n=5,j=1;
printf(―enter a no‖);
scanf(“%d”,&i);
while (i>0 && j<n)
{ if(i%2== 0)
{
printf(“%d”,i);
printf(“is a even number”);
i++; j++;
}
else
{
printf(“%d”,i);
printf(“its a odd number”);
i++;
j++;
}
}
getch();
3. if….else
#include<stdio.h>
#include <conio.h>
void main ()
{
int I,c;
printf(“enter a number “);
scanf(“%d” ,&i); if(i%2==0)
Page |7
{
printf(“%d” ,i);
printf({“s a even number”);
}
else
{
printf(“%d”,i);
printf(“is a odd number”);
}
}
4. switch
#include<stdio.h>
#include <conio.h>
void main()
{
int a,b,c;
printf(“1.add/n 2.sub /n 3.mul /n 4.div /n enter your choice”);
scanf(“%d‖”, &i);
printf(“enter a,b values”);
scanf(“%d%d” ,&a,&b);
switch(i)
{
case 1: c=a+b;
printf(“the sum of a & b is: %d”,c);
break;
case 2: c=a-b;
printf(”the diff of a & b is: %d” ,c);
break;
case 3: c=a*b;
printf(“the mul of a & b is: %d”,c);
break;
case 4: c=a/b;
printf(“the div of a & b is: %d‖ ,c);
break:;
default:
printf(“enter your choice”);
break;
}
getch();
}
5. for
Page |8
#include<stdio.h>
#include <conio.h>
main()
{
int i;
printf(“enter a no”);
scanf(“%d‖”,&i);
for(i=1;i<=5;i++)
{ if(i%2== 0)
{
printf(“%d”, i);
printf(“is a even no”);
i++;
}
else
{
printf(“%d”, i);
printf(“is a odd no”);
i++;
}
}
getch();
}
Input/output
1. do…while
Test cases:
Test case no: 1
Test case name: Positive values within range
2. while
Test cases:
1. if …else
Input Actual output
2 2 is even number
3 is odd number
4 is even number
5 is odd number
6 is even number
Test cases:
Test case no: 1
2. switch
Experiment-3
Objective
A program written in C- language for Matrix Addition´Introspect the causes for its failure and
write down the possible reasons for its failure.
output:
enter the number of row=2
enter the number of column=2
enter the first matrix element= 1 2 3 4
enter the second matrix element= 1 2 3 4
multiply of the matrix=2 4
6 8
Failure cases:
output:
Enter the size of a: 2 3
P a g e | 13
Experiment-4
Objective
Take any system (e.g. ATM system) and study its system specifications and report the
various bugs.
Experiment-5
Objective
Write the test cases for GMAIL
10. Verify that sent mails can be found in ‘Sent Mail’ sections of the sender.
11. Verify that mail can be sent to non-gmail emailIds also.
12. Verify that all sent emails get piled up in the ‘Sent Mail’ section and get deleted in cyclic
fashion based on the size availability.
13. Verify that the emails composed but not sent remain in the draft section.
14. Verify the maximum number of email recipients that can be entered in ‘To’, ‘cc’ and
‘bcc’ sections.
15. Verify the maximum length of text that can be entered in the ‘Subject’ textbox.
16. Verify the content limit of text/images that can be entered and successfully delivered as
mail body.
17. Verify the maximum size and number of attachment that can be attached with an email.
18. Verify that only the allowed specifications of the attachment can be attached with an
email/
19. Verify that if the email is sent without Subject, a pop-up is generated warning user about
no subject line. Also, verify that on accepting the pop-up message, the user is able to
send the email.
P a g e | 17
Experiment 6
Objective
Study of Any Testing Tool (Win Runner)
Experiment 6A
Create a script by recording in Context Sensitive mode that tests the process of opening an
order in the Flight Reservation application. You will create the script
6. Stop recording.
In Win Runner, choose Create > Stop Recording or click the Stop button on the toolbar.
Output: Win Runner Test Results window is open and displays the test results.
P a g e | 20
Conclusion: Recording in Context Sensitive mode is cleared and test results are also seen.
Experiment 6B
Aim: Purpose of this exercise is to Study Synchronizing test
Synchronizing test
When you run tests, your application may not always respond to input with the same speed.
For example, it might take a few seconds:
1. To retrieve information from a database
2. For a window to pop up
3. For a progress bar to reach 100%
4. For a status message to appear
Output: Win Runner Test Results window is open and displays the test results.
Conclusion: Importance of Synchronizing test is cleared and test results are also seen.
Experiment 7
Selenium
Objective
Study of any web testing tool (Selenium)
Selenium-RC provides an API (Application Programming Interface) and library for each of
its supported languages: HTML, Java, C#, Perl, PHP, Python, and Ruby. This ability to use
Selenium-RC with a high-level programming language to develop test cases also allows the
automated testing to be integrated with a project’s automated build environment.
Selenium-Grid
Selenium-Grid allows the Selenium-RC solution to scale for large test suites or test suites that
must be run in multiple environments. With Selenium-Grid, multiple instances of Selenium-
RC are running on various operating system and browser configurations; Each of these when
launching register with a hub. When tests are sent to the hub they are then redirected to an
available Selenium-RC, which will launch the browser and run the test. This allows for
running tests in parallel, with the entire test suite theoretically taking only as long to run as
the longest individual test.
1. Tests developed on Firefox via Selenium-IDE can be executed on any other supported
browser via a simple Selenium-RC command line.
2. Selenium-RC server can start any executable, but depending on browser security set-tings
there may be technical limitations that would limit certain features.
perhaps, Selenium’s strongest characteristic when compared with proprietary test automation
tools and other open-source solutions. Selenium-RC support for multiple programming and
scripting languages allows the test writer to build any logic they need into their automated
testing and to use a preferred programming or scripting language of one’s choice.
Selenium-IDE allows for the addition of user-defined user extensions for creating additional
commands customized to the user’s needs. Also, it is possible to re-configure how the
Selenium- IDE generates its Selenium-RC code. This allows users to customize the generated
code to fit in with their own test frameworks. Finally, Selenium is an Open Source project
where code can be modified and enhancements can be submitted for contribution.
Test Suites
A test suite is a collection of tests. Often one will run all the tests in a test suite as one
continuous batch job. When using Selenium -IDE, test suites also can be defined using a
simple HTML file. The syntax again is simple. An HTML table defines a list of tests where
each row defines the file system path to each test. An example tells it all.
<html>
<head>
<title>Test Suite Function Tests – Priority 1</title></head>
<body>
<table>
<tr><td><b>Suite Of Tests</b></td></tr>
<tr><td><a href=‖./Login.html‖>Login</a></td></tr>
<tr><td><a href=‖./SearchValues.html>‖ Test Searching for Values</a></td></tr>
<tr><td><a href=‖./SaveValues.html‖>Test Save</a></td></tr>
</table></body>
</html>
A file like this would allow running the tests all at once, one after another, from the
Selenium-IDE.
Test suites can also be maintained when using Selenium-RC. This is done via programming
and can be done a number of ways. Commonly Junit is used to maintain a test suite if one is
using Selenium-RC with Java. Additionally, if C# is the chosen language, Nun it could be
employed. If using an interpreted language like Python with Selenium-RC than some simple
programming would be involved in setting up a test suite. Since the whole reason for using
Sel-RC is to make use of programming logic for your testing this usually isn’t a problem.
Experiment 8
Bugbit
Objective
Study of Any Test Management Tool (Test Director, BUGBIT)
Specifying Requirements
1. Requirements are linked to tests and defects to provide complete traceability and aid the
decision- making process
2. See what percent of requirements are covered by tests
3. Each requirement in the tree is described in detail, and can include any relevant
attachments. The QA tester assigns the requirement a priority level which is taken into
consideration when the test team creates the test plan
4. Import from Microsoft Word or third-party RM tool
Planning Tests
1. The Test Plan Manager enables to divide application according to functionality.
Application can be divided into units, or subjects, by creating a test plan tree.
2. Define subjects according to:
3. Application functionality-such as editing, file operations, and reporting
4. Type of testing-such as functional, user interface, performance, and load
5. As the tests are also linked to defects, this helps ensure compliance with testing
requirements throughout the testing process.
P a g e | 25
Running Tests
As the application constantly changes, using test lab, run manual and automated tests in the
project to locate defects and assess quality.
1. By creating test sets and choosing which tests to include in each set, test suite can be
created? A test set is a group of tests in a Test Director Project database designed to achieve
specific testing goals.
Tests can be run manually or scheduled to run automatically based on application
dependencies
Tracking Defects
Locating and repairing application defects efficiently is essential to the testing process.
Defects can be detected and added during all stages of the testing process. In this phase you
per-form the following tasks:
1. This tool features a sophisticated mechanism for tracking software defects, enabling
Testing Team and the project Team to monitor defects closely from initial detection until
resolution
2. By linking Test Director to e-mail system, defect tracking information can be shared by all
Development and Management Teams, Testing and Wipro Software Quality Assurance
personnel.
P a g e | 26
Experiment 9
Bugzilla
Objective
Study of any bug tracking tool (Bugzilla)
1. Bugzilla is very adaptable to various situations. Known uses currently include IT support
queues, Systems Administration deployment management, chip design and development
problem tracking (both pre- and-post fabrication), and software and hardware bug tracking
for luminaries such as Redhat, NASA, Linux-Mandrake, and VA Systems. Combined with
systems such as CVS, Bugzilla provides a powerful, easy to use solution to configuration
management and replication problems.
Bugzilla is organized in the form of bug reports that give all the information needed about a
particular bug. A bug report would consist of the following fields.
1. Product–>Component
2. Assigned to
3. Status (New, Assigned, Fixed etc)
4. Summary
P a g e | 27
5. Bug priority
6. Bug severity (blocker, trivial etc)
7. Bug reporter
Using Bugzilla:
Bugzilla usage involves the following activities Setting Parameters and Default Preferences
1. Creating a New User
2. Impersonating a User
3. Adding Products
4. Adding Product Components
5. Modifying Default Field Values
6. Creating a New Bug
7. Viewing Bug Reports
Before entering bugs, make sure we add some new users. We can enter users very easily,
with a minimum of information. Bugzilla uses the email address as the user ID, because users
are frequently notified when a bug is entered, either because they entered the bug, because
the bug is assigned to them, or because they’ve chosen to track bugs in a certain project.
1. Click users.
2. Click adds a new user.
3. Enter the login name, in the form of an email address.
4. Enter the real name, a password, and then click add.
5. Select the group access options. We’ll probably want to enable the following options in
the row titled user is a member of these groups:
6. Can confirm
7. Edit bugs
8. Edit components
9. Click update when done with setting options.
Impersonating a User:
Impersonating a user is possible, though rare, that we may need to file or manage a bug in an
area that is the responsibility of another user when that user is not available. Perhaps the user
is on vacation, or is temporarily assigned to another project. We can impersonate the user to
create or manage bugs that belong to that user.
Adding Products
We’ll add a product in Bugzilla for every product we are developing. To start with, when we
first login to Bugzilla, we’ll find a test product called TestProduct. We should delete this
and create a new product.
To add a product:
1. At the bottom of the page, click Products.
2. In the TestProduct listing, click Delete.
3. Click Yes, Delete.
4. Now click Add a product.
5. Enter a product name, such as Widget Design Kit.
6. Enter a description.
To find a bug:
1. Click Reports.
P a g e | 29
2. Click the Search link on the page, not the one in the top menu. This opens a page titled
Find a Specific Bug.
3. Select the Status.
4. Select the Product.
5. Enter a word that might be in the title of the bug.
6. Click Search. If any bugs meet the criteria that we have entered, Bugzilla displays them in
a list summary.
7. Click the ID number link to view the full bug report.
Experiment 10
Test Link
Objective
Study of any open source testing tool (Test Link).
Overall structure
There are three cornerstones: Product, Test Plan and User. All other data are relations or
attributes for this base. First, definition of a couple of terms that are used throughout the
documentation.
Products and Test Plans
1. Product: A Product is something that will exist forever in TestLink. Products will under-go
many different versions throughout their lifetimes. Product includes Test Specification with
Test Cases and should be sorted via Keywords.
2. Test Plan: Test Plans are created when you‗d like to execute test cases. Test plans can be
made up of the test cases of one or many Products. Test Plan includes Builds, Test Case Suite
and Test Results.
3. User: A User has a Role that defines available Test Link features.
1. Component: Components are the parents of Categories. Each Component can have many
2. Categories.
3. Category: Categories are the parents of test cases. Each Category can have many test cases.
4. Test Case: Test cases are the fundamental piece of TestLink.
5. Test Specification: All Components, Categories and test cases within Product.
6. Test Case Suite: All Components, Categories and test cases within Test Plan.
Requirements relation
Test cases could be related with software/system requirements as n to n. The functionality
must be enabled for a Product. User can assign Test Cases and Requirements via link Assign
Requirements in the main screen.
Test Plans
Test plan contains name, description, collection a chosen test cases, builds, test results,
milestones, tester assignment and priority definition.
necessary when creating a test plan for a patch. In order for a user to see a test plan they must
have the proper rights. Rights may be assigned (by leads) in the define User/Project
Rights section. This is an important thing to remember when users tell you they can‗t see the
project they are working on.
Test Execution
Test execution is available when:
1. A Test Specification is written.
2. A Test Plan is created.
3. Test Case Suite (for the Test Plan) is defined.
4. A Build is created.
5. The Test plan is assigned to testers (otherwise they cannot navigate to this TestPlan).
6. Select a required Test Plan in main page and navigate to the Execute test link. Left pane
serves for navigation in Test Case Suite via tree menu, filtering and define a tested build.
Test Status
Execution is the process of assigning a result (pass, fail, blocked) to a test case for a specific
build. Blocked‗test case is not possible to test for some reason (e.g. a problem in
configuration disallows to run a tested functionality).
Advantages:
1. Easy in tracking test cases(search with keyword, test case id, version etc)
2. We can add our custom fields to test cases.
3. Allocating the work either test case creation/execution any kind of documents is easy
4. when a test cases is updated the previous version also can be tracked
5. We can generate results build wise
6. Test plans are created for builds and work allocations can be done.
Report, is one of the awesome functionality present in the Test link, it generates reports in
desired format like HTML/ CSV /Excel and we can create graphs too. And the above all is
done on the privileges based which is an art of the testlink and I liked this feature very much.
1. Administrator create a Product Fast Food‖ and a user Adam with rights leader and Bela
with rights Senior tester.
2. Adam imports Software Requirements and for part of these requirements generates empty
Test cases.
3. Bela describe test scenario of these Test cases that are organized according to Components
and Categories.
4. Adam creates Keyword: Regression‖ and assigns this keyword to ten of these test cases.
5. Adam creates a Test Plan Fish & Chips, Build Fish 0.1 and add Test Cases with keywords
Regression.
6. Adam and Bela execute and record the testing with result: 5 passed, 1 failed and 4 are
blocked.
7. Developers make a new build Fish 0.2 and Bela tests the failed and blocked test cases only.
Exceptionally all these five Test cases passed.
8. Manager would like to see results. Administrator explains him that he can create account
himself on the login page. Manager does it. He has Guest rights and could see results and
Test cases. He can see that everything passed in overall report and problems in build Fish 0.1
in a report for particular Build. But he can change nothing.