INFO815: Software Development and Testing Assessment 3 Report Analysis
VerifiedAdded on 2023/04/06
|12
|2113
|258
Report
AI Summary
This report details the development and testing of a GUI application in C# using Visual Studio, as part of the INFO815 Software Development and Testing course. The project involves comparing terms from two user-selected folders containing documents, displaying terms in a textbox with five terms per line, and implementing a doubly linked list for data storage, adhering to the assignment's restriction against built-in data structures. The report includes a critical analysis of the development methodology, emphasizing the use of DLLs for data handling and Microsoft.Office.Interop.Word for document processing. Unit testing, including white-box testing, is thoroughly covered, with explanations of test cases for boundary scenarios and complex methods, alongside the use of the Test Explorer in Visual Studio. The report presents code snippets, screenshots, and video demonstrations to illustrate the implementation and testing procedures, including considerations for the application's design, comments, and indentation, and includes discussion of the DLL methods and unit testing in C#.
Contribute Materials
Your contribution can guide someone’s learning journey. Share your
documents today.

Proofs:
TestData Attached with indications
Code Attached in zip folder with name AssessmentofStudentId.zip
Videos attached with name both in zip and rar folder as Order_Video at the end
Introduction:
The project is considered with the requirements, as user will be having two folders with the name
took predefined folder names as ‘UserIndicateFolder1’,’ UserIndicateFolder2’ and if the user is
fetching document from first folder with the name ‘UserIndicateFolder1’ the text will be displayed
and user can see the text and if the document is fetched from second folder with the name
‘UserIndicateFolder2’ document with in the folder will not return any text and it will throw exception
saying choose file from first folder with name ‘UserIndicateFolder1’ . And here I am handling and
attaching only doc files to view the results and test data for the project is here. These two folders
have to be saved in the path ‘C:\User Folders\’ . Below zipped folder extract in the path ‘C:\User
Folders\’
Videos: video consist of 3 minutes performance having end to end details about unit test and code
how will be running in website with iis. To tun this code IIS need to be enable in the system. Video
attached at the end with the name Order_Video.rar .Attached zip file too for videos
Code : Also attached at the end of the page with the name AssessmentStudentID.zip
First will go through Visual Studio and Development Methodologies
Visual Studio is Microsoft product where we can develop windows and web applications. Windows
application required .exe file to run the solution and web application will be hosted in IIS with
specific http or https requests. In specific versions we have different type of editions like professional
, community and etc. Community edition is free to download and good to learn and practice
programs. The latest version of Visual studio is 2019.
But the current project for this assignment is done in Visual studio 2017. Will go through one by one
to understand Visual studio how we will develop web applications, as this assignment can be done
either in windows or web application. I have preferred to do in web applications
Graphical User Interface development and testing can be
performed/Abstract
Here we will see how to develop visual studio with the new webform project as I am using webforms
with asp.net application and c# coding which is basic start for developer to start here for
webapplications
To start development of the project first we will start with the below steps
Step 1: Click on File from Menu Bar -> For to New -> Select Project and after selecting project
immediately one pop up will open where you can choose windows or web appliactions and so on ,
but as per the reqirement and my thingking have choosen Web application with C# development
TestData Attached with indications
Code Attached in zip folder with name AssessmentofStudentId.zip
Videos attached with name both in zip and rar folder as Order_Video at the end
Introduction:
The project is considered with the requirements, as user will be having two folders with the name
took predefined folder names as ‘UserIndicateFolder1’,’ UserIndicateFolder2’ and if the user is
fetching document from first folder with the name ‘UserIndicateFolder1’ the text will be displayed
and user can see the text and if the document is fetched from second folder with the name
‘UserIndicateFolder2’ document with in the folder will not return any text and it will throw exception
saying choose file from first folder with name ‘UserIndicateFolder1’ . And here I am handling and
attaching only doc files to view the results and test data for the project is here. These two folders
have to be saved in the path ‘C:\User Folders\’ . Below zipped folder extract in the path ‘C:\User
Folders\’
Videos: video consist of 3 minutes performance having end to end details about unit test and code
how will be running in website with iis. To tun this code IIS need to be enable in the system. Video
attached at the end with the name Order_Video.rar .Attached zip file too for videos
Code : Also attached at the end of the page with the name AssessmentStudentID.zip
First will go through Visual Studio and Development Methodologies
Visual Studio is Microsoft product where we can develop windows and web applications. Windows
application required .exe file to run the solution and web application will be hosted in IIS with
specific http or https requests. In specific versions we have different type of editions like professional
, community and etc. Community edition is free to download and good to learn and practice
programs. The latest version of Visual studio is 2019.
But the current project for this assignment is done in Visual studio 2017. Will go through one by one
to understand Visual studio how we will develop web applications, as this assignment can be done
either in windows or web application. I have preferred to do in web applications
Graphical User Interface development and testing can be
performed/Abstract
Here we will see how to develop visual studio with the new webform project as I am using webforms
with asp.net application and c# coding which is basic start for developer to start here for
webapplications
To start development of the project first we will start with the below steps
Step 1: Click on File from Menu Bar -> For to New -> Select Project and after selecting project
immediately one pop up will open where you can choose windows or web appliactions and so on ,
but as per the reqirement and my thingking have choosen Web application with C# development
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

Step 2 : After click of project in above Screen 1 select Web and ASP.Net web application. Give the
name as ‘AssessmentofStudentId’. Browse the path to save your application and click on ok
Step 3 : I have Selected Empty Project and in check box select Webforms, also select the Add unit
tests for unit test cases from check box as shown in the below screen Screen Shot and Click on Ok.
name as ‘AssessmentofStudentId’. Browse the path to save your application and click on ok
Step 3 : I have Selected Empty Project and in check box select Webforms, also select the Add unit
tests for unit test cases from check box as shown in the below screen Screen Shot and Click on Ok.

Step 4 : Right Click Solution Click on Add and select Web Forms will open popup change the name to
the Web Form as you wish
After Adding WebForm the project I have created will be displayed as below:
In the application the concept is only first folder document data will be load in the text box and even
if you try to change the second folder and load the data in the doc it will not load. The exception
the Web Form as you wish
After Adding WebForm the project I have created will be displayed as below:
In the application the concept is only first folder document data will be load in the text box and even
if you try to change the second folder and load the data in the doc it will not load. The exception

here it is given is either after load of page by using ctrl+F5 or ctrl+R it will be allowing you to load
the text in textbox with the format of five terms in each line by using doubly linked list (DLL concept).
To add new class right click on the project and add class. For AssesmentStudentId.tests project add
the AssessmentStudentId dll to call methods in this project for testing purpose
Below are the development methodologies
Microsoft.Office.Interop.Word – This is the Microsoft dll used to read the content of the document
file and this is used for all word documents to read. In the project I am using this when attaching file
to read the content of file as below. The methods and procedure related to this is used as below
classes.
//Application Class using interop word to read word documents
Application _worddoc = new Application();
//Object class for Document
Document _document = new Document();
system.IO – This can be used to read and write data to the files, for delegate and class and structure
will be defined using this IO , in the project all the classes will be targeted from this IO namespaces.
Dynamic – This is the datatype which will be defined the data type based on the runtime value, for
example if you are passing runtime as 1 it will take as int or if passing ‘2019-01-01’ then it will take as
date. Below is the sample code for this
dynamic empty = System.Type.Missing;
dynamic _filepath =
Path.GetFullPath(FileUploads.PostedFile.FileName);
Now we started with doubly linked list concept to split the document and insert data in text box with
five terms in single line and the code as below
Doubly Linked List : This doubly linked list in the project is used to insert string value before or after
or last , these methodNames is specifically every developer have to consider for naming specific
understanding what method is performing. Methods also described as below:
InserFront() : This will search for previous Node to be null and searches is list have data to insert
front of the doubly linked list and below is the code for insertfront
public void InsertFront(DoublyLinkedList doublyLinkedList, string data)
{
DoublyNode newNode = new DoublyNode(data);
newNode.next = doublyLinkedList.head;
newNode.previous = null;
if (doublyLinkedList.head != null)
{
doublyLinkedList.head.previous = newNode;
}
doublyLinkedList.head = newNode;
}
InsertBefore() : This will be when you are giving previous node address and data will be inserted next
to the previous node.
public void InsertBefore(DoublyNode nextnode, string data)
{
the text in textbox with the format of five terms in each line by using doubly linked list (DLL concept).
To add new class right click on the project and add class. For AssesmentStudentId.tests project add
the AssessmentStudentId dll to call methods in this project for testing purpose
Below are the development methodologies
Microsoft.Office.Interop.Word – This is the Microsoft dll used to read the content of the document
file and this is used for all word documents to read. In the project I am using this when attaching file
to read the content of file as below. The methods and procedure related to this is used as below
classes.
//Application Class using interop word to read word documents
Application _worddoc = new Application();
//Object class for Document
Document _document = new Document();
system.IO – This can be used to read and write data to the files, for delegate and class and structure
will be defined using this IO , in the project all the classes will be targeted from this IO namespaces.
Dynamic – This is the datatype which will be defined the data type based on the runtime value, for
example if you are passing runtime as 1 it will take as int or if passing ‘2019-01-01’ then it will take as
date. Below is the sample code for this
dynamic empty = System.Type.Missing;
dynamic _filepath =
Path.GetFullPath(FileUploads.PostedFile.FileName);
Now we started with doubly linked list concept to split the document and insert data in text box with
five terms in single line and the code as below
Doubly Linked List : This doubly linked list in the project is used to insert string value before or after
or last , these methodNames is specifically every developer have to consider for naming specific
understanding what method is performing. Methods also described as below:
InserFront() : This will search for previous Node to be null and searches is list have data to insert
front of the doubly linked list and below is the code for insertfront
public void InsertFront(DoublyLinkedList doublyLinkedList, string data)
{
DoublyNode newNode = new DoublyNode(data);
newNode.next = doublyLinkedList.head;
newNode.previous = null;
if (doublyLinkedList.head != null)
{
doublyLinkedList.head.previous = newNode;
}
doublyLinkedList.head = newNode;
}
InsertBefore() : This will be when you are giving previous node address and data will be inserted next
to the previous node.
public void InsertBefore(DoublyNode nextnode, string data)
{
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

if (nextnode != null)
{
DoublyNode newNode = new DoublyNode(data);
newNode.previous = nextnode.previous;
nextnode.previous = newNode;
newNode.next = nextnode;
if (newNode.previous != null)
{
newNode.previous.next = newNode;
}
}
}
InsertLast(): This will search for the last node and will try to fetch last node to insert data at the end
public void InsertLast(DoublyLinkedList doublyLinkedList, string data)
{
DoublyNode newNode = new DoublyNode(data);
if (doublyLinkedList.head == null)
{
newNode.previous = null;
doublyLinkedList.head = newNode;
return;
}
DoublyNode lastNode = GetLastNode(doublyLinkedList);
lastNode.next = newNode;
newNode.previous = lastNode;
}
StringBuilder – is the string which is used to append the text in the next line as this is the best way to
append strings in each line.
public string PrintList(DoublyLinkedList doublyLinkedList)
{
string sb = string.Empty;
DoublyNode n = doublyLinkedList.head;
while (n != null)
{
sb = sb != string.Empty ? sb + n.data + " " : n.data + " ";
n = n.next;
}
return sb;
}
btnLoad_Click – is the event generated for button click to display text how ever use is excpecting. Try
catch exception are used to perform error handling and Document and Application classes is to read
word document.
protected void btnLoad_Click(object sender, EventArgs e)
{
try
{
//Object class for Document
Document _document = new Document();
//Application Class using interop word to read word documents
Application _worddoc = new Application();
{
DoublyNode newNode = new DoublyNode(data);
newNode.previous = nextnode.previous;
nextnode.previous = newNode;
newNode.next = nextnode;
if (newNode.previous != null)
{
newNode.previous.next = newNode;
}
}
}
InsertLast(): This will search for the last node and will try to fetch last node to insert data at the end
public void InsertLast(DoublyLinkedList doublyLinkedList, string data)
{
DoublyNode newNode = new DoublyNode(data);
if (doublyLinkedList.head == null)
{
newNode.previous = null;
doublyLinkedList.head = newNode;
return;
}
DoublyNode lastNode = GetLastNode(doublyLinkedList);
lastNode.next = newNode;
newNode.previous = lastNode;
}
StringBuilder – is the string which is used to append the text in the next line as this is the best way to
append strings in each line.
public string PrintList(DoublyLinkedList doublyLinkedList)
{
string sb = string.Empty;
DoublyNode n = doublyLinkedList.head;
while (n != null)
{
sb = sb != string.Empty ? sb + n.data + " " : n.data + " ";
n = n.next;
}
return sb;
}
btnLoad_Click – is the event generated for button click to display text how ever use is excpecting. Try
catch exception are used to perform error handling and Document and Application classes is to read
word document.
protected void btnLoad_Click(object sender, EventArgs e)
{
try
{
//Object class for Document
Document _document = new Document();
//Application Class using interop word to read word documents
Application _worddoc = new Application();

dynamic empty = System.Type.Missing;
dynamic _filepath = " C:\\User Folders\\UserIndicateFolder1\\"
+ FileUploads.PostedFile.FileName;
_document = _worddoc.Documents.Open(ref _filepath, ref empty,
ref empty
, ref empty, ref empty, ref empty, ref empty, ref empty,
ref empty, ref empty, ref empty, ref empty, ref empty
, ref empty, ref empty, ref empty);
//We will be getting the result set in the way that assessment
is provided for me
//Details are five terms in single line for a test document
StringBuilder _sb = new StringBuilder();
for (int i = 0; i < _document.Paragraphs.Count; i++)
{
string fileData = _document.Paragraphs[i +
1].Range.Text.Trim();
if (fileData != string.Empty)
{
_sb.Append(fileData);
}
}
StringBuilder _result = new StringBuilder();
((_Document)_document).Close();
((_Application)_worddoc).Quit();
IEnumerable<string> lstresult = new List<string>();
lstresult = _sb.ToString().Split(' ').ToList();
StringBuilder sbb = new StringBuilder();
LineDLL _lineDLL = new LineDLL();
DoublyLinkedList myLinkedList = new DoublyLinkedList();
var count = ((Convert.ToDecimal(lstresult.Count()) /
Convert.ToDecimal(5)) > (Convert.ToInt32(lstresult.Count() / 5)) ?
(Convert.ToInt32(lstresult.Count() / 5) + 1) :
(Convert.ToInt32(lstresult.Count() / 5)));
int j = 0;
for (int i = 0; i < count; i++)
{
myLinkedList = new DoublyLinkedList();
var result = lstresult.Skip(j).Take(5).ToList();
if (1 < result.Count)
_lineDLL.InsertFront(myLinkedList, result[1]);
if (0 < result.Count)
_lineDLL.InsertFront(myLinkedList, result[0]);
if (4 < result.Count)
_lineDLL.InsertLast(myLinkedList, result[4]);
if (2 < result.Count)
_lineDLL.InsertBefore(myLinkedList.head.next.next,
result[2]);
if (3 < result.Count)
_lineDLL.InsertAfter(myLinkedList.head.next.next,
result[3]);
dynamic _filepath = " C:\\User Folders\\UserIndicateFolder1\\"
+ FileUploads.PostedFile.FileName;
_document = _worddoc.Documents.Open(ref _filepath, ref empty,
ref empty
, ref empty, ref empty, ref empty, ref empty, ref empty,
ref empty, ref empty, ref empty, ref empty, ref empty
, ref empty, ref empty, ref empty);
//We will be getting the result set in the way that assessment
is provided for me
//Details are five terms in single line for a test document
StringBuilder _sb = new StringBuilder();
for (int i = 0; i < _document.Paragraphs.Count; i++)
{
string fileData = _document.Paragraphs[i +
1].Range.Text.Trim();
if (fileData != string.Empty)
{
_sb.Append(fileData);
}
}
StringBuilder _result = new StringBuilder();
((_Document)_document).Close();
((_Application)_worddoc).Quit();
IEnumerable<string> lstresult = new List<string>();
lstresult = _sb.ToString().Split(' ').ToList();
StringBuilder sbb = new StringBuilder();
LineDLL _lineDLL = new LineDLL();
DoublyLinkedList myLinkedList = new DoublyLinkedList();
var count = ((Convert.ToDecimal(lstresult.Count()) /
Convert.ToDecimal(5)) > (Convert.ToInt32(lstresult.Count() / 5)) ?
(Convert.ToInt32(lstresult.Count() / 5) + 1) :
(Convert.ToInt32(lstresult.Count() / 5)));
int j = 0;
for (int i = 0; i < count; i++)
{
myLinkedList = new DoublyLinkedList();
var result = lstresult.Skip(j).Take(5).ToList();
if (1 < result.Count)
_lineDLL.InsertFront(myLinkedList, result[1]);
if (0 < result.Count)
_lineDLL.InsertFront(myLinkedList, result[0]);
if (4 < result.Count)
_lineDLL.InsertLast(myLinkedList, result[4]);
if (2 < result.Count)
_lineDLL.InsertBefore(myLinkedList.head.next.next,
result[2]);
if (3 < result.Count)
_lineDLL.InsertAfter(myLinkedList.head.next.next,
result[3]);

j = j + 5;
string sbs = _lineDLL.PrintList(myLinkedList);
sbb.AppendLine(sbs);
}
txtAreaResult.Text = sbb.ToString();
}
catch(Exception ex)
{
txtAreaResult.Text = "An error occurred contact administrator
or upload file form only UserIndicateFolder1";
}
}
About Unit testing in the Project andTest Values of boundary values and
cases and Reports of test coverage as below:
Considered doubly linked list (DLL) as indepth testing is performed here and will explain in detail
As a part of development methodologies it is performed by selecting unit test checkbox.
How the node will be inserting before, after, last has been tested in these values and cases as
performed with the attached test scenarios and develop tests also attached here:
As below screen shot .tests project has been created and UnitTest1.cs class is added as showing
here:
To Run or debug tests follow steps go to Test -> Windows -> TestExplorer , then you can see the Test
explorer as shown here:
string sbs = _lineDLL.PrintList(myLinkedList);
sbb.AppendLine(sbs);
}
txtAreaResult.Text = sbb.ToString();
}
catch(Exception ex)
{
txtAreaResult.Text = "An error occurred contact administrator
or upload file form only UserIndicateFolder1";
}
}
About Unit testing in the Project andTest Values of boundary values and
cases and Reports of test coverage as below:
Considered doubly linked list (DLL) as indepth testing is performed here and will explain in detail
As a part of development methodologies it is performed by selecting unit test checkbox.
How the node will be inserting before, after, last has been tested in these values and cases as
performed with the attached test scenarios and develop tests also attached here:
As below screen shot .tests project has been created and UnitTest1.cs class is added as showing
here:
To Run or debug tests follow steps go to Test -> Windows -> TestExplorer , then you can see the Test
explorer as shown here:
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Now we will go to InsertFront() Method considering the text as excpected and actual as both has to
be equal. After executing this insertfront() with hard coded different values it has to match with the
excpected value and same way we have use different methods for InsertLast(), InsertAfter() by using
next node as below highlighted
To run the tests we have two different way can be run by individual tests or run all option both can
be used which will be shown in vide and here for reference highlighting.
be equal. After executing this insertfront() with hard coded different values it has to match with the
excpected value and same way we have use different methods for InsertLast(), InsertAfter() by using
next node as below highlighted
To run the tests we have two different way can be run by individual tests or run all option both can
be used which will be shown in vide and here for reference highlighting.

And for Debug individual tests .Right Click Method -> Debug Individual test method
White box testing
White box testing is a testing which developer will be performing and indepth about functionality
and fields declared for the purpose , will include unit testing . Have to perform all input and output
values and no need to wait for GUI to be completed here. All the controls will be validated here,
functional changes , and integration testing changes. Tester will be usually peform Black box testing
and developer will usually performs white box testing. TextBox return values and the expected
values have to match for functional testing, calculations of each functionality performance of testing.
This will beyond the user-interface it means indepth testing is performed.
Methods of DLL
We have different type of linked list in c# like single linked list, double linked list and double circular
linked list
Node : head of this will have data, next and previous node
White box testing
White box testing is a testing which developer will be performing and indepth about functionality
and fields declared for the purpose , will include unit testing . Have to perform all input and output
values and no need to wait for GUI to be completed here. All the controls will be validated here,
functional changes , and integration testing changes. Tester will be usually peform Black box testing
and developer will usually performs white box testing. TextBox return values and the expected
values have to match for functional testing, calculations of each functionality performance of testing.
This will beyond the user-interface it means indepth testing is performed.
Methods of DLL
We have different type of linked list in c# like single linked list, double linked list and double circular
linked list
Node : head of this will have data, next and previous node

Previous Node : At the initial stage of insertion it will be having null value.
Next Node : At the last stage of insertion it will be having null value.
Doubly linked List Class : Will be having different methods InsertAfter, InsertBefore, and InsertLast ,
GetLastNode these are implemented in the current project
Usually we will be having some more methods also like DeleteNodeByKey, and GetNodeAddress.
The first Link will always points for the previousNode here and Last Link will always be pointing to
Nextnode
To insert value to next node you have to know the previous node address to insert properly data or
to delete properly data
Unit testing in C#
Unit test can be done in NUnit and .Net Core. Unit testing in C# is which developer will be
performing. Unit tests need to be separated from the integration tests. TestClass is the Attribute and
TestMethod is the methos which will be there in MS test tools. First thing
Below attached is the code video
Code of the Project is attached with below zip file
Screenshots of output of the application
Screen Load of 1st Screen
Next Node : At the last stage of insertion it will be having null value.
Doubly linked List Class : Will be having different methods InsertAfter, InsertBefore, and InsertLast ,
GetLastNode these are implemented in the current project
Usually we will be having some more methods also like DeleteNodeByKey, and GetNodeAddress.
The first Link will always points for the previousNode here and Last Link will always be pointing to
Nextnode
To insert value to next node you have to know the previous node address to insert properly data or
to delete properly data
Unit testing in C#
Unit test can be done in NUnit and .Net Core. Unit testing in C# is which developer will be
performing. Unit tests need to be separated from the integration tests. TestClass is the Attribute and
TestMethod is the methos which will be there in MS test tools. First thing
Below attached is the code video
Code of the Project is attached with below zip file
Screenshots of output of the application
Screen Load of 1st Screen
Secure Best Marks with AI Grader
Need help grading? Try our AI Grader for instant feedback on your assignments.

After load will attach document from first folder of user folder so that text is getting displayed as out
put in text box with five terms in each line
When user attach file form second folder form user folders text box will have exception message and
attached is the screen shot
put in text box with five terms in each line
When user attach file form second folder form user folders text box will have exception message and
attached is the screen shot

1 out of 12
Related Documents

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
© 2024 | Zucol Services PVT LTD | All rights reserved.