ST File
ST File
A program written in C- language for Matrix Addition ´Introspect the causes for
3.
its failure and write down the possible reasons for its failure.
Take any system (e.g. ATM system) and study its system specifications and
4.
report the various bugs.
5. Write the test cases for any known application (e.g. Banking application)
Create a test plan document for any application (e.g. Library Management
8.
System)
11. BUG TRACKING TOOL Study of bug tracking tool (e.g. Bugzilla).
OBJECTIVE
To understand the working of do…while with different range of values and test cases
#include <stdio.h>
void main () {
int i, n=5,j=0;
clrscr();
printf("enter a no");
scanf("%d",&i);
do {
if(i%2==0) {
printf("%d", i);
printf("is a even no.");
i++;
}
else {
printf("%d", i);
printf("is a odd no.\n");
i++;
}
j++;
} while(i>0&&j<n);
getch();
}
Test Cases
Test Case 1: Positive values within range
Input =2 Expected output Actual output Remarks
2 is even number 2 is even number
3 is odd number 3 is odd number success
4 is even number 4 is even number
5 is odd number 5 is odd number
6 is even number 6 is even number
To understand the working of if else with different range of values and test cases
#include <conio.h>
void main() {
int i;
for (i = 1; i <= 5; i++) {
if (i % 2 == 0) {
printf("number is even no:%d\n", i);
i++;
}
printf("number is odd no:%d\n", i);
}
getch();
}
Test Cases
Test Case 1: Positive values within range
Input =2 Expected output Actual output Remarks
2 is even number 2 is even number
3 is odd number 3 is odd number success
4 is even number 4 is even number
5 is odd number 5 is odd number
6 is even number 6 is even number
Output
Input Output
Enter Ur choice: 1 The sum of a & b is:5
Enter a, b Values: 3, 2
Enter Ur choice: 2 The diff of a & b is: 1
Enter a, b Values: 3, 2
Test Cases
Test Case 1: Positive values within range
Input Expected output Actual output Remarks
Enter Ur choice: 1 The sum of a & b is:5 5
Enter a, b Values: 3, 2
Enter Ur choice: 2 The diff of a & b is: 1 1 Success
Enter a, b Values: 3, 2
Enter Ur choice: 3 The Mul of a & b is: 6 6
Enter a, b Values: 3, 2
Enter Ur choice: 4 The Div of a & b is: 1 1
Enter a, b Values: 3, 2
To understand the working of for with different range of values and test cases
#include <stdio.h>
#include <conio.h>
void main () {
int i;
clrscr();
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++;
}
printf(“ % d”, i);
printf(“is a odd no”);
i++;
}
getch();
}
Output
Input Output
Test Cases
Test Case 1: Positive values within range
Input Expected output Actual output Remarks
0 is even number 0 is an even number
SOURCE CODE
#include<stdio.h>
#include<stdlib.h>
int main() {
int a[10][10], b[10][10], mul[10][10], r, c, i, j, k;
system("cls");
printf("enter the number of row=");
scanf("%d", & r);
printf("enter the number of column=");
scanf("%d", & c);
printf("enter the first matrix element=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", & a[i][j]);
}
}
printf("enter the second matrix element=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
scanf("%d", & b[i][j]);
}
}
printf("multiply of the matrix=\n");
for (i = 0; i < r; i++) {
for (j = 0; j < c; j++) {
mul[i][j] = 0;
for (k = 0; k < c; k++) {
mul[i][j] += a[i][k] * b[k][j];
}
}
}
OUTPUT
enter the number of row=2
enter the number of column=2
enter the first matrix element=
1234
enter the second matrix element=
1234
multiply of the matrix=
7 10
15 22
FAILURE CASES
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[].
Enter the size of a: p q
Enter the size of b: r s
Matrix multiplication is not possible.
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[], and rows & columns should be integer
values.
Enter the size of a: 1.5 2
Enter the size of b: 2 3.2
Matrix multiplication is not possible.
Reason to fail: To do multiplication of matrices the number of columns in matrix ―a[]
should be equal to number of rows in matrix ―b[], and rows & columns should be within
the range.
Enter the size of a: 350 480
Enter the size of b: 480 620
Matrix multiplication is not possible. (There will be loss of data)
Reason to fail: Size of buffer will be not be sufficient to handle this multiplication.
Enter the size of a: -1 -2
Enter the size of b: -2 3
Matrix multiplication is not possible
TEST CASES
Test Case 1: Columns of 1st matrix not equal to rows of 2nd matrix
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 2 2 Operation can’t be
Matrix 2 rows & performed fail
cols= 3 2
Test Case 2: Equal number of rows and columns
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 3 3
Matrix 2 rows &
cols= 3 3
Matrix1:
333 333
111
333 333
111 Success
333 333
111
Matrix2:
111
111
111
Matrix1:
1234567891 2222222222
2234567891 2222222221 fail
Matrix2:
234567891 22222221533
213242424 56456475457
EXPERIMENT-3
AIM
A program written in C Language for Matrix Addition fails. Introspect the causes for its
failure and write down the possible reasons for its failure.
SOURCE CODE
#include <stdio.h>
int main() {
int m, n, c, d, first[10][10], second[10][10], sum[10][10];
printf("Enter the number of rows and columns of matrix\n");
scanf("%d%d", & m, & n);
printf("Enter the elements of first matrix\n");
for (c = 0; c < m; c++)
for (d = 0; d < n; d++)
scanf("%d", & first[c][d]);
printf("Enter the elements of second matrix\n");
for (c = 0; c < m; c++)
for (d = 0; d < n; d++)
scanf("%d", & second[c][d]);
printf("Sum of entered matrices:-\n ");
for (c = 0; c < m; c++) {
for (d = 0 ; d < n; d++) {
sum[c][d] = first[c][d] + second[c][d];
printf("%d\t", sum[c][d]);
}
printf("\n");
}
return 0;
}
OUTPUT
Enter the number of rows and columns of matrix
22
Enter the elements of first matrix
1234
Enter the elements of second matrix
1234
Sum of entered matrices:-
2 4
6 8
FAILURE CASES
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[].
Enter the size of a: p q
Enter the size of b: r s
Matrix addition is not possible.
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[], and rows & columns should be integer values.
Enter the size of a: 1.5 2
Enter the size of b: 1.5 2
Matrix addition is not possible.
Reason to fail: To do addition of matrices the order of matrix ―a[] should be equal to the
order of matrix ―b[], and rows & columns should be within the range.
Enter the size of a: 350 480
Enter the size of b: 350 480
Matrix addition is not possible. (There will be loss of data)
Reason to fail: Size of buffer will be not be sufficient to handle this addition.
Enter the size of a: -1 -2
Enter the size of b: -1 -2
Matrix addition is not possible
TEST CASES
Test Case 1: Order of matrices are not same
Input Expected output Actual output Remark
Matrix 1 rows &
cols= 2 2 Operation can’t be
Matrix2 rows & performed fail
cols= 3 2
Matrix1:
222 222
111
222 222
111 Success
222 222
111
Matrix2:
111
111
111
Matrix1:
1234567891 2222222222
2234567891 2222222221 fail
Matrix2:
234567891 22222221533
213242424 56456475457
EXPERIMENT-4
AIM
Take any system (e.g. ATM System) and study its system specifications and report the
various bugs.
SOURCE CODE
#include<stdio.h>
#include<conio.h>
OUTUPT
ENTER YOUR PIN NUMBER: 1097
Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.25000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 2
ENTER THE AMOUNT: 20000 PLEASE COLLECT YOUR CASH
YOUR CURRENT BALANCE =RS.5000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.5000
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 3
ENTER THE AMOUNT: 200 YOUR BALANCE =RS.5200
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 1
YOUR BALANCE =Rs.5200
DO U WISH TO HAVE ANOTHER TRANSCATION?(y/n): Welcome to ATM Service
1. Check Balance
2. Withdraw Cash
3. Deposit Cash
4. Quit
Enter your choice: 4
TEST CASES
Test cases for opening bank account
Input parameters checking
− Name
− Date of Birth
− Photo
− Address Proof
− Identity Proof
− Introducers (if applicable)
− PAN card
− Initial deposit
− Whether checkbook / ATM card / Online banking facilities are needed or not
− Customer signature
Type of account
− Savings account
− Salary account
− -Joint account
− Current account
− Secondary account
− RD account
− Account for a company
Test Cases
Test
Test Expected Actual Test
Case Test Case Status
Scenario Result Result Data
Id
1 Validate Enter invalid System should Customer
the login user name and not allow the is not
page enter valid password in customer to able to
invalid/ SBI online login the SBI login SBI
Ex:
wrong user Banking login online Banking online
UID:
name and page login page and banking
Pass abcdef
valid it should account
PWD:
password display the
xyz123
message like
”please enter
valid user name
and password”
2 validate the Enter invalid System should Customer
login page user name and not allow the is not
enter invalid invalid pass word customer to able to
user name in SBI online login the SBI login SBI
Ex:
and invalid Banking login online Banking online
UID:
password page login page and Banking
Pass abcd
it should account
PWD:
display the
xyz12
message like “
please enter
valid user name
and password
3 Validate the Enter valid user System should Customer Ex:
login page name and invalid allow the user is logged UID:
enter valid password in SBI to login the SBI in to SBI Pass abcdefg
user name online Banking online Banking online PWD:
and invalid login page login page Banking xyz1234
password login
page
User/customer
phone number
EXPERIMENT-6
AIM
Write the test cases for GMAIL
TEST CASES
Test Cases for Gmail Login page
Sr.
Test Scenarios
No.
1 Enter the valid email address & click next. Verify if the user gets an option to
enter the password.
2 Don’t enter an email address or phone number & just click the Next button.
Verify if the user will get the correct message or if the blank field will get
highlighted.
3 Enter the invalid email address & click the Next button. Verify if the user will get
the correct message.
4 Enter an invalid phone number & click the Next button. Verify if the user will get
the correct message.
5 Verify if a user can log in with a valid email address and password.
6 Verify if a user can log in with a valid phone number and password.
7 Verify if a user cannot log in with a valid phone number and an invalid password.
8 Verify if a user cannot log in with a valid email address and a wrong password.
3. Verify that the user can enter multiple comma-separated email Ids in ‘To’, ‘cc’
and ‘bcc’sections.
4. Verify that the user can type Subject line in the ‘Subject’ textbox.
5. Verify that the user can type the email in the email-body section.
6. Verify that users can format mail using editor-options provided like choosing
font-family,font-size, bold-italic-underline, etc.
7. Verify that the user can attach file as an attachment to the email.
8. Verify that the user can add images in the email and select the size for the same.
9. Verify that after entering email Ids in either of the ‘To’, ‘cc’ and ‘bcc’ sections,
entering Subject line and mail body and clicking ‘Send’ button, mail gets
delivered to intended receivers.
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 email Ids also.
12. Verify that all sent emails get piled up in the ‘Sent Mail’ section and get deleted
in cyclicfashion 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 mailbody.
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.
EXPERIMENT-7
AIM
Write test cases for FACEBOOK, TWITTER etc.
Verify the login page for both, when the field is blank and
3 Negative
Submit button is clicked.
Verify the time taken to log in with a valid username and Performance &
11
password. Positive Testing
Verify if the font, text color, and color coding of the Login UI Testing & Positive
12
page is as per the standard. Testing
Browser
14 Verify the login page and all its controls in different browsers Compatibility &
Positive Testing.
Non-functional Security Test Cases:
Show entries
Search:
• The retrieved customer information by viewing customer detail should contain the
four attributes.
Result: pass
Update/delete student
Pass criteria:
• Updates can be made on full. Items only: Name, Address, Phone number
Result: pass
• The updated values would be reflected if the same customer's ID/SSN is called for.
Result: pass
• Each book shall have following attributes: Call Number, ISBN, Title, Author name.
Result: pass
• The data items which can be updated are: ISBN, Title, Author name
Result: pass
• The updated values would be reflected if the same call number is called for
Result: pass
• The product shall let Librarian query books’ detail information by their ISBN number
or Author or Title.
Result: pass
• The search results would produce a list of books, which match the search
parameters with following Details: Call number, ISBN number, Title, Author
Result: pass
• The display would also provide the number of copies which is available for issue
Result: pass
• The display shall provide a means to select one or more rows to a user-list
Result: pass
• The search display will be restricted to 20 results per page and there would be
means to navigate from sets of search results.
Result: pass
• The user can perform multiple searches before finally selecting a set of books for
check-in or check-out. These should be stored across searches.
Result: pass
• A book may have more than one copy. But every copy with the same ISBN number
should have same detail information.
Result: pass
• The borrower’s list should agree with the data in students’ account
Result: pass
Check-in book
Pass criteria:
• The check-in can be initiated from a previous search operation where user has
selected a set of books.
Result: pass
• The return date would automatically reflect the current system date.
Result: did not pass.
• Any late fees would be computed as difference between due date and return date at
the rate of 10 cents a day.
Result: did not pass
• A book, which has been checked in once, should not be checked in again
Result: pass
Check-out book
Pass criteria:
• The checkout can be initiated from a previous search operation where user has
selected a set of books.
Result: pass
• The issue date would automatically reflect the current system date. The due date
would automatically be stamped as 5 days from current date.
Result: did not pass
• A book, which has been checked out once, should not be checked out again
Result: pass
• A student who has books due should not be allowed to check out any books
Result: did not pass
• The max. No of books that can be issued to a customer would be 10. The system
should not allow checkout of books beyond this limit.
Result: pass
View book detail
Pass criteria:
• This view would display details about a selected book from search operation
Result: pass
• The details to be displayed are: Call number, IBN, Title, Author, Issue status (In
library or checked out), If book is checked out it would display, User ID & Name,
Check-out date, Due date
Result: for checkout date and due date, did not pass
− The books issued by user with issue date, due date, call number, title
Result: did not pass
− Late fees & Fines summary and total
Result: did not pass
THEORY
What is Selenium?
JavaScript framework that runs in your web browser Works anywhere JavaScript is
supported Hooks for many other languages Java, Ruby, Python Can simulate a user
navigating through pages and then assert for specific marks on the pages All you need to
really know is HTML to start using it right away.
Selenium IDE
Selenium Integrated Development Environment (IDE) is a Firefox plugin that lets testers to
record their actions as they follow the workflow that they need to test.
It provides a Graphical User Interface for recording user actions using Firefox which is used
to learnand use Selenium, but it can only be used with Firefox browser as other browsers
are not supported.
However, the recorded scripts can be converted into various programming languages
supported by Selenium and the scripts can be executed on other browsers as well.
Step 2 − Firefox add-ons notifier pops up with allow and disallow options. User has to allow
the installation.
Step 3 − The add-ons installer warns the user about untrusted add-ons. Click 'Install Now'
Step 4 − The Selenium IDE can now be accessed by navigating to Tools >> Selenium IDE.
Step 5 − The Selenium IDE can also be accessed directly from the quick access menu bar as
shownbelow.
Selenium IDE Features
This section deals with the features available in Selenium IDE.
The following image shows the features of Selenium IDE with the help of a simple tool-tip.
Step 3 − Navigate to "Math Calculator" >> "Percent Calculator >> enter "10" as number1
and 50 as number2 and click "calculate".
Step 4 − User can then insert a checkpoint by right clicking on the web element and select
"Show all available commands" >> select "assert text css=b 5"
Step 5 − The recorded script is generated and the script is displayed as shown below.
Saving the Recorded Test
Step 1 − Save the Test Case by navigating to "File" >> "Save Test" and save the file in the
location of your choice. The file is saved as .HTML as default.
The test can also be saved with an extension htm, shtml, and xhtml.
Step 1 − Create a test suite by navigating to "File" >> "New Test Suite" as shown below.
Step 2 − The tests can be recorded one by one by choosing the option "New Test Case" from
the "File" Menu.
Step 3 – The individual tests are saved with a name along with saving a "Test Suite".
Step 1 − The Run status can be seen in the status pane that displays the number of tests
passed and failed.
Step 2 − Once a step is executed, the user can see the result in the "Log" Pane.
Step 3 − After executing each step, the background of the test step turns "Green" if passed
and "Red" if failed as shown below.
Step 2 − Now launch 'Selenium IDE' and you will notice a new icon, "Pause on Fail" on
recording toolbar as shown below. Click it to turn it ON. Upon clicking again, it would be
turned "OFF".
Step 3 − Users can turn "pause on fail" on or off any time even when the test is running.
Step 4 − Once the test case pauses due to a failed step, you can use the resume/step
buttons to continue the test execution. The execution will NOT be paused if the failure is on
the last command of any test case.
Step 5 − We can also use breakpoints to understand what exactly happens during the step.
To insert a breakpoint on a particular step, "Right Click" and select "Toggle Breakpoint" from
the context- sensitive menu.
Step 6 − Upon inserting the breakpoint, the particular step is displayed with a pause icon as
shown below.
Step 7 − When we execute the script, the script execution is paused where the breakpoint is
inserted. This will help the user to evaluate the value/presence of an element when the
execution is in progress.
The test cases that we develop also need to check the properties of a web page. It requires
assert and verify commands. There are two ways to insert verification points into the script.
To insert a verification point in recording mode, "Right click" on the element and choose
"Show all Available Commands" as shown below.
We can also insert a command by performing a "Right-Click" and choosing "Insert New
Command".
After inserting a new command, click 'Command' dropdown and select appropriate
verification point from the available list of commands.
Given below are the mostly used verification commands that help us check if a particular
step has passed or failed.
• verifyElementPresent
• assertElementPresent
• verifyElementNotPresent
• assertElementNotPresent
• verifyText
• assertText
• verifyAttribute
• assertAttribute
• verifyChecked
• assertChecked
• verifyAlert
• assertAlert
• verifyTitle
• assertTitle
Synchronization Points
During script execution, the application might respond based on server load, hence it is
required for the application and script to be in sync. Given below are few a commands that
we can use to ensure that the script and application are in sync.
• waitForAlertNotPresent
• waitForAlertPresent
• waitForElementPresent
• waitForElementNotPresent
• waitForTextPresent
• waitForTextNotPresent
• waitForPageToLoad
• waitForFrameToLoad
Like locators, patterns are a type of parameter frequently used by Selenium. It allows users
to describe patterns with the help of special characters. Many a time, the text that we
would like to verify are dynamic; in that case, pattern matching is very useful.
Pattern matching is used with all the verification point commands - verifyTextPresent,
verifyTitle, verifyAlert, assertConfirmation, verifyText, and verifyPrompt.
Globbing
Most techies who have used file matching patterns in Linux or Windows while searching for
a certain file type like *.doc or *.jpg would be familiar with term "globbing".
Globbing in Selenium supports only three special characters: *, ?, and [ ].
To specify a glob in a Selenium command, prefix the pattern with the keyword 'glob:'. For
example, if you would like to search for the texts "tax year 2013" or "tax year 2014", then
you can use the golb "tax year *" as shown below.
However the usage of "glob:" is optional while specifying a text pattern because globbing
patterns are the default in Selenium.
Exact Patterns
Patterns with the prefix 'exact:' will match the given text as it is. Let us say, the user wants
an exact match with the value string, i.e., without the glob operator doing its work, one can
use the 'exact' pattern as shown below. In this example the operator '*' will work as a
normal character rather than a pattern-matching wildcard character.
Regular Expressions
Regular expressions are the most useful among the pattern matching techniques available.
Selenium supports the complete set of regular expression patterns that JavaScript supports.
Hence the users are no longer limited by *, ? and [] globbing patterns.
To use Regular Expression patterns, we need to prefix with either "regexp:" or "regexpi:".
The prefix "regexpi" is case-insensitive. The glob: and the exact: patterns are the subsets of
the Regular Expression patterns. Everything that is done with glob: or exact: can be
accomplished with the help of RegExp.
For example, the following will test if an input field with the id 'name' contains the string
'tax year', 'Tax Year', or 'tax Year'.
Command Target Value
clickAndWait Link = search
verifyValue Id = name Regexp:[Tt]ax([Yy]ear)
It is easy to extend Selenium IDE by adding customized actions, assertions, and locator-
strategies. It is done with the help of JavaScript by adding methods to the Selenium object
prototype. On startup, Selenium will automatically look through the methods on these
prototypes, using name patterns to recognize which ones are actions, assertions, and
locators.
Let us add a 'while' Loop in Selenium IDE with the help of JavaScript.
Step 2 − Now launch 'Selenium IDE' and navigate to "Options" >> "Options" as shown below.
Step 3 − Click the 'Browse' button under 'Selenium Core Extensions' area and point to the js
file that we have saved in Step 1.
TEST CASES
THEORY
Bugzilla is a ―Bug Tracking System that can efficiently keep track of outstanding bugs in a
product. Multiple users can access this database and query, add and manage these bugs.
Bugzilla essentially comes to the rescue of a group of people working together on a product
as it enables them to view current bugs and make contributions to resolve issues. Its basic
repository nature works out better than the mailing list concept and an organized database
is always easier to work with.
• Impersonating a User
• Adding Products
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.
7. Click Add. A message appears that you‘ll need to add at least one component.
Adding Product Components
Products are comprised of components. Software products, in particular, are typically made
up of many functional components, which in turn are made up of program elements, like
classes and functions. It‘s not unusual in a software development team environment for
different individuals to be responsible for the bugs that are reported against a given
component. Even if there are other programmers working on that component, it‘s not
uncommon for one person, either a project lead or manager, to be the gatekeeper for bugs.
Often, they will review the bugs as they are reported, in order to redirect them to the
appropriate developer or even another team, to review the priority and severity supplied by
the reporter, and sometimes to reject bugs as duplicates or enhancement requests, for
example.
To add a component:
1. Click the link add at least one component in the message that appears after creating
a new product.
2. Enter the Component name.
3. Enter a Description.
4. Enter a default assignee. Use one of the users we‘ve created. Remember to enter
the assignee in the form of an email address.
5. Click Add.
6. To add more components, click the name of product in the message that reads edit
other components of product <product name>.
THEORY
Test Link is an open source test management tool. It enables creation and organization of
test cases and helps manage into test plan. Allows execution of test cases from test link
itself. One can easily track test results dynamically, generate reports, generate test metrics,
prioritize test cases and assign unfinished tasks. It’s a web based tool with GUI, which
provides an ease to develop test cases, organize test cases into test plans, execute these
test cases and generate reports. Test link exposes API, written in PHP, can help generate
quality assurance dashboards. The functions like Add Test Case to Test Plan, Assign
Requirements, Create Test Case etc. helps create and organize test cases per test plan.
Functions like Get Test Cases for Test Plan, Get Last Execution Result allows one to create
quality assurance dashboard.
Test Link enables easily to create and manage Test cases as well as organize them into Test
plans. These Test plans allow team members to execute Test cases and track test results
dynamically, generate reports, trace software requirements, prioritize and assign tasks.
Read more about implemented features and try demo pages.
Overall Structure
There are three cornerstones: Product, or attributes for this base. First, definition of
documentation.
Products and Test Plans
Test Plan and User. All other data are relations a couple of terms that are used throughout
the
Product: A Product is something that will exist forever in Test Link. Products will undergo
many different versions throughout their life time. Product includes Test Specification with
Test Cases and should be sorted via Keywords.
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.
User: A User has a Role that defines available Test Link features.
Test Case Categorization
Test Link breaks down the test case structure into three levels Components, Categories, and
test cases. These levels are persisted throughout the application.
• Component: Components are the parents of Categories. Each Component can have
many Categories.
• Category: Categories are the parents of test cases. Each Category can have many test
cases.
• Test Case: Test cases are the fundamental piece of Test Link.
Test Specification: All Components, Categories and test cases within Product.
Test Case Suite: All Components, Categories and test cases within Test Plan. Test
Specification
Test Specification
Creating Test Cases
Tester must follow this structure: Component, Category and test case. At first you create
Component(s) for your Product. Component includes Categories. Category has the similar
meaning but is second level of Test Specification and includes just Test Cases.
User can also copy or move Test Cases. Test Cases has following parts:
• Title: could include either short description or abbreviation (e.g. TL-USER-LOGIN)
• Summary: should be really short; just for overview.
• Steps: describe test scenario (input actions); can also include precondition and
cleanup information here.
• Expected results: describe checkpoints and expected behavior a tested Product or
system.
Test Plans
Test plan contains name, description, collection a chosen test cases, builds, test results,
milestones, tester assignment and priority definition.
Creating a new Test Plan
Test Plans may be deleted from the ―Create test plan‖ page (link ―Create Test Plan‖) by
users with lead privileges. Test plans are the basis for test case execution. Test plans are
made up of test cases imported from Products at a specific point of time. Test plans can only
be created by users with lead privileges. Test plans may be created from other test plans.
This allows users to create test plans from test cases that at a desired point in time. This
may be 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 Test
Plan).
Select a required Test Plan in main page and navigate to the ‗Execute tests‘ 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).
Insert Test results
Test Results screen is shown via click on an appropriate Component, Category or test case in
navigation pane. The title shows the current build and owner. The colored bar indicate
status of the test case. Yellow box includes test scenario of the test case.
Updated Test Cases: If users have the proper rights they can go to the ―Update modified
test case‖ page through the link on main page. It is not necessary for users to update test
cases if there has been a change (newer version or deleted).
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.
7. 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.
8. And the above all is done on the privileges based which is an art of the testlink and i
liked this feature much
PRACTICAL
Login to Test Link
Open the Test link home-page and enter the login details
1. Enter the user ID – admin
2. Enter the password
3. Click on the login tab
Step 3: Enter all the required fields in the window like category for test project, name of the
project, prefix, description, etc. After filling all necessary details, click on tab "Create" at the
end of the window.
This will create your project "Guru99" successfully.
Step 1: From the home-page, click on Test Plan Management from home-page.
Step 2: It will open another page, at the bottom of the page click on a tab "Create"
Step 3: Fill out all the necessary information like name, description, create from existing test
plan, etc. in the open window, and click on "create tab".
Step 2: In the next window, fill all necessary details for software release and click on create
to save your release
1. Enter the title name
2. Enter the description about the software release
3. Mark the check-box for status- Active
4. Mark the check-box for status- Open
5. Choose the data of release
6. Click on create button
Once you have a release the software it, will appear like this
Step 2: On the right-hand side of the panel, click on the setting icon It will display a
series of test operation.
Step 3: Click on the "create" tab for the test suite
Step 4: Fill-up all the details for test-suite and click on save it tab.
1. Enter the test suite name
2. Enter the details about your test suite
3. Click on save button to save the details of test-suite
Your test suite appears on the left side of the panel under folder structure tree
Creating a Test Case
Test case holds a sequence of test steps to test a specific scenario with expected result.
Below steps will explain how to create a test-case along with test steps.
Step 1: Click on the test suite folder on the left side of the panel under folder tree structure
Step 2: Click on the setting icon in the right side panel. List of test case operations will be
displayed on the right side panel
Step 3: New window will open, to create test cases click on create button in test-case
operations
Step 6: Click on test-case from the folder as shown above, it will open a window. Click on
"create steps" button in test case. It will open a test case step editor
Step 7: It will open another window on the same page, in that window you have to enter the
following details
1. Enter the step-action for your test case
2. Enter the details about the step action
3. Click save it and add another step action OR click save and exit tab if there is no
more test step toad
Step 8: Once you save and exit the test step, it will appear like this
Assigning test case to test plan
For test case to get execute, it should be assign to test plan. Here we will see how we can
assign a test-case to test plan.
Step 1) Click on the setting icon on the test panel. It will show the list of operations.
Step 2) Click on "Add to Test Plans".
Step 1: From the Test links home-page, click on users/roles icon from the navigation bar
Here in the list we can see the users have been created
Step 2: From the requirement page, on the right side of the panel click on "create" button
Step 3: A new window will open, enter all the details like
1. Document ID
2. Title name
3. Requirement description
4. And Click "Save" button
For the type, you can choose the option from the drop-down- here we chose "User
Requirement Specification"
Step 4: It should create Requirement specification and displayed on the left side panel
under project "Guru99".
Step 5: Select the setting button from requirements specification home-page. It will open
another window.
Step 6: Fill out all the specified details and click the "Save" button
1. Enter the document ID
2. Enter the title name
3. Enter the description
4. Enter the status-whether it's in draft, rework, review, not testable, etc. Here we
chose valid
5. Enter the type – user interface, non-functional, informational, feature, etc. Here we
chose use case
6. Enter the number of test cases needed
7. Enter "Save" button at the end
Note: To add more requirements you can mark the check-box and click save button
On the left side of the panel, we can see that requirement is added.
Assigning requirement to test-cases
In Test link, Requirement can be connected to test cases. It is very crucial feature in order to
track test coverage based on requirements. In test reports, you can verify which
requirements are not covered and act on them to append in test suites for maximum test
coverage
Step 1: From test specification section open any single test case and click on requirement
icon
Step 2: To assign requirements specification to test case you have to follow the following
steps
1. Scroll the drop down box to select the requirements specification
2. Mark the requirement check box
3. Click on "assign" tab
After clicking on "assign" tab, a window will appear stating "Assigned Requirement."
Step 1: From the navigation bar click on the "Test Execution" link. It will direct you to the
Test Execution Panel.
Step 2: Pick the Test case you want to run from the left side panel
Step 3: Once you have selected the test cases, it will open a window.
Step 2: From the left side panel, select "Test Report" link
Step 3: To generate a report follow the following steps
1. Mark and unmark the option you want to highlight in your test report
2. Click on your project folder
Step 1: Choose the test case you want to export in the Test specification page.
Step 2: Now on the right-hand side of the panel click on the setting icon, it will display
all the operations that can be performed on the test case.
Step 3: Click the "export" button
Step 4: It will open another window, mark the option as per requirement and click on the
export tab
Step 2: Click on the setting icon on the right hand-side of the panel, it will display all
the operations that can be executed on the test suite/test case.
Step 3: Click on the import button in the test case operations list as
Step 4: Browse and attach the xml test case file that you have exported from test link and
click on upload button.
1. Use the browse option to attach the XML test case file that you have exported from
test link
2. Click on upload file
When you upload a file, it will open window stating import test cases
Step 5: Test case will be uploaded and displayed on the right-hand side of the panel