<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sthakur5</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Sthakur5"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Sthakur5"/>
	<updated>2026-05-18T10:44:48Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145519</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145519"/>
		<updated>2022-04-27T15:54:24Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified:&lt;br /&gt;
* Assignment.java &amp;lt;br&amp;gt;&lt;br /&gt;
* BackEnd.java &amp;lt;br&amp;gt; &lt;br /&gt;
* FrontEnd.java &amp;lt;br&amp;gt; &lt;br /&gt;
* FrontEndView.java &amp;lt;br&amp;gt; &lt;br /&gt;
* MySQL5xDataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* MySQL80DataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* OracleDataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* Submission.java &amp;lt;br&amp;gt;&lt;br /&gt;
* SubmissionCollection.java &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&amp;lt;br&amp;gt;&lt;br /&gt;
The demo can be found [https://www.youtube.com/watch?v=_REy_S142bQ&amp;amp;ab_channel=RachitSharma].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145518</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145518"/>
		<updated>2022-04-27T15:54:06Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified&lt;br /&gt;
* Assignment.java &amp;lt;br&amp;gt;&lt;br /&gt;
* BackEnd.java &amp;lt;br&amp;gt; &lt;br /&gt;
* FrontEnd.java &amp;lt;br&amp;gt; &lt;br /&gt;
* FrontEndView.java &amp;lt;br&amp;gt; &lt;br /&gt;
* MySQL5xDataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* MySQL80DataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* OracleDataAccessObject.java &amp;lt;br&amp;gt;&lt;br /&gt;
* Submission.java &amp;lt;br&amp;gt;&lt;br /&gt;
* SubmissionCollection.java &amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&amp;lt;br&amp;gt;&lt;br /&gt;
The demo can be found [https://www.youtube.com/watch?v=_REy_S142bQ&amp;amp;ab_channel=RachitSharma].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145517</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145517"/>
		<updated>2022-04-27T15:52:45Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified&lt;br /&gt;
* '''Assignment.java &amp;lt;br&amp;gt;* BackEnd.java &amp;lt;br&amp;gt;* FrontEnd.java &amp;lt;br&amp;gt;* FrontEndView.java &amp;lt;br&amp;gt;* MySQL5xDataAccessObject.java &amp;lt;br&amp;gt;* MySQL80DataAccessObject.java &amp;lt;br&amp;gt;* OracleDataAccessObject.java &amp;lt;br&amp;gt;* Submission.java &amp;lt;br&amp;gt;* SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&amp;lt;br&amp;gt;&lt;br /&gt;
The demo can be found [https://www.youtube.com/watch?v=_REy_S142bQ&amp;amp;ab_channel=RachitSharma].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145516</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145516"/>
		<updated>2022-04-27T15:51:52Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Github and Related Link */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&amp;lt;br&amp;gt;&lt;br /&gt;
The demo can be found [https://www.youtube.com/watch?v=_REy_S142bQ&amp;amp;ab_channel=RachitSharma].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145515</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145515"/>
		<updated>2022-04-27T15:51:36Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Github and Related Link */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
The demo can be found [https://www.youtube.com/watch?v=_REy_S142bQ&amp;amp;ab_channel=RachitSharma].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145514</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145514"/>
		<updated>2022-04-27T15:45:10Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-merge.yml '''maven-build-merge.yml'''] and [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/.github/workflows/maven-build-pr.yml '''maven-build-pr.yml'''] files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145513</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145513"/>
		<updated>2022-04-27T15:42:42Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Proposed Solution */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/pom.xml pom.xml]''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145512</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145512"/>
		<updated>2022-04-27T15:42:07Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* SubmissionCollection.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145511</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145511"/>
		<updated>2022-04-27T15:41:45Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* FrontEnd.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''[https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java FrontEndTests.java]''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java&amp;quot; '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145510</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145510"/>
		<updated>2022-04-27T15:40:54Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* FrontEnd.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java&amp;quot;  '''FrontEndTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java&amp;quot; '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145509</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145509"/>
		<updated>2022-04-27T15:39:23Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* SubmissionCollection.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java&amp;quot; '''FrontEndTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/SubmissionCollectionTests.java&amp;quot; '''SubmissionCollectionTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145508</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145508"/>
		<updated>2022-04-27T15:38:59Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* FrontEnd.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [&amp;quot;https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/FrontEndTests.java&amp;quot; '''FrontEndTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''SubmissionCollectionTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145507</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145507"/>
		<updated>2022-04-27T15:38:31Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* TestResult.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/TestResultTests.java '''TestResultTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''FrontEndTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''SubmissionCollectionTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145506</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145506"/>
		<updated>2022-04-27T15:37:48Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created [https://github.com/Sakshamrzt/SQL-File-Evaluation/blob/master/src/sqlfe/junit/AssignmentTests.java '''AssignmentTests.java'''] file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''TestResultTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''FrontEndTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''SubmissionCollectionTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145505</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145505"/>
		<updated>2022-04-27T15:31:59Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''AssignmentTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''TestResultTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''FrontEndTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''SubmissionCollectionTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
=== Track our works for collaboration  ===&lt;br /&gt;
&lt;br /&gt;
We have used Github projects to keep a track of all the tasks and the progress associated with those tasks.&lt;br /&gt;
&lt;br /&gt;
[[File:progress.png|1200px|project tasks]]&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Progress.png&amp;diff=145504</id>
		<title>File:Progress.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Progress.png&amp;diff=145504"/>
		<updated>2022-04-27T15:31:48Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145499</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145499"/>
		<updated>2022-04-27T15:10:25Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Files modified===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BackEnd.java &lt;br /&gt;
&lt;br /&gt;
[[File:backend.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
Submissions.java&lt;br /&gt;
&lt;br /&gt;
[[File:Submissions.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; ]]&lt;br /&gt;
&lt;br /&gt;
==BackEnd.java==&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''AssignmentTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''TestResultTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''FrontEndTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
To check the above scenarios we have created '''SubmissionCollectionTests.java''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Default or Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:mvn.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
To implement the proposed changes we have added '''pom.xml''' file.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution '''maven-build-merge.yml''' and '''maven-build-pr.yml''' files are created.&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To implement the proposed solution the following files are modified '''Assignment.java , BackEnd.java , FrontEnd.java , FrontEndView.java , MySQL5xDataAccessObject.java , MySQL80DataAccessObject.java , OracleDataAccessObject.java , Submission.java and SubmissionCollection.java''' .&lt;br /&gt;
&lt;br /&gt;
[[File:error.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; We have redirected the error stream using the following code.]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
==Github and Related Link==&lt;br /&gt;
The forked git repository for this project can be found [https://github.com/Sakshamrzt/SQL-File-Evaluation].&amp;lt;br&amp;gt;&lt;br /&gt;
The pull request can be found [https://github.com/wagnerpj42/SQL-File-Evaluation/pull/39].&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvn.jpg&amp;diff=145498</id>
		<title>File:Mvn.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Mvn.jpg&amp;diff=145498"/>
		<updated>2022-04-27T15:04:57Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145096</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=145096"/>
		<updated>2022-04-25T01:26:26Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist.&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144852</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144852"/>
		<updated>2022-04-12T01:43:47Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed from the scope of the project.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144850</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144850"/>
		<updated>2022-04-12T01:39:00Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;br /&gt;
&lt;br /&gt;
'''Note:''' The requirement &amp;quot;Ensure that all file (of SQL queries) parsing errors are logged in the /evaluations/AAA_parse_problems file (this was broken by a previous contributor)&amp;quot; has been removed.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144841</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144841"/>
		<updated>2022-04-12T01:33:05Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Task 4 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Currently, the project does not contain any automated build functionality. We plan to create a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144837</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144837"/>
		<updated>2022-04-12T01:30:39Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Creating a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
===Manual Testing ===&lt;br /&gt;
&lt;br /&gt;
==== Task 1 ==== &lt;br /&gt;
* Copy the current output file to a directory outside the project scope.&lt;br /&gt;
* Run the project generating the new output file.&lt;br /&gt;
* The generated output file should be formatted in the same manner as shown in the image above.&lt;br /&gt;
&lt;br /&gt;
==== Task 3 ==== &lt;br /&gt;
* Trigger the maven build using: mvn clean install&lt;br /&gt;
* Check for the existence of a new jar SQLFE.jar is generated in the project's root directory.&lt;br /&gt;
&lt;br /&gt;
==== Task 4 ==== &lt;br /&gt;
* Navigate to the project's GitHub page. Go to the Github actions page.&lt;br /&gt;
* Enter your email in the prompt.&lt;br /&gt;
* Choose a branch and trigger a build using Github actions.&lt;br /&gt;
* Check your mailbox for an automated mail containing a jar/.exe file.&lt;br /&gt;
&lt;br /&gt;
==== Task 5 ==== &lt;br /&gt;
* Launch the project.&lt;br /&gt;
* Enter the wrong name for the database.&lt;br /&gt;
* Try to run an evaluation.&lt;br /&gt;
* The project will generate a new file in the evaluation folder containing the error. Check this file for appropriate messages and accurate format.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144814</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144814"/>
		<updated>2022-04-12T01:19:15Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Task 5 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes. As most of the task here are refactoring output files and moving the project to a different build, we don't have any design pattern refactoring.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Creating a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
=== Task 5 ===&lt;br /&gt;
&lt;br /&gt;
==== Current Implementation ====&lt;br /&gt;
Any errors like use of wrong database credentials etc. are currently shown in the GUI for SQLFE. We plan to remove system errors visible to user via GUI to a file in /evaluations folder and hide them from the user.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We plan to create a new file `AAA_system_error.out` which will contain all the system errors/exceptions noticed by the application and remove all the code which was publishing that data to the GUI.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following JUnit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144512</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144512"/>
		<updated>2022-04-07T01:17:34Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*Check the regular expression for the question with an unacceptable format like a 1, %1, and $2.&lt;br /&gt;
*Check the question without the period(.) in the question name.&lt;br /&gt;
*Check whether the name of propertiesFilename is valid or not. If the file is invalid it should throw the appropriate exception.&lt;br /&gt;
*Check if the final output i.e. the questions is correct. For this we will check the following two values:&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;1. The number of questions is the same.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;2. The points for each question are the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====TestResult.java=====&lt;br /&gt;
* Add a warning and check the expected value in the containsWarning function.&lt;br /&gt;
* Set the test score and check its expected value in the getScore function.&lt;br /&gt;
* Check the TestResult function with parameters and check the expected value of the parameters (score, warning, extraRows, missingRows)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====FrontEnd.java=====&lt;br /&gt;
* Write Frontend information out to the properties file and check the value with set values(in the test case) &lt;br /&gt;
* Check to set the input parameters with a different datatype.&lt;br /&gt;
* Appropriate action should be taken if the file does not exist.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=====SubmissionCollection.java=====&lt;br /&gt;
* Check the submission marks and submissions from the returned value of the result from hashcode method and test if they have the respective correct values.&lt;br /&gt;
* Check the behavior of the equals method if it correctly checks the 3 categories of inputs: object, submissionMarks, and submissions.&lt;br /&gt;
* Parsewriter and Commwriter files exist after the function is called.&lt;br /&gt;
* Create a mini submission and check &lt;br /&gt;
* Check if the number of submissions is the same as expected - totalSubmissions is the same as filecount&lt;br /&gt;
* Check whether the submission file name is the same as expected.&lt;br /&gt;
* Appropriate action should be taken if the submission folder path does not exist?&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Creating a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
[[File:build.jpeg|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; CI/CD pipeline]]&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following Junit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144340</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144340"/>
		<updated>2022-04-06T18:55:33Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Deployment - This profile goes hand in hand with the automated builds on Github Actions. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.png|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 4===&lt;br /&gt;
Creating a CI/CD pipeline for continuous build functionality which will generate an executable, compile all the JUnit test cases as well as, integrates supported databases.&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We are thinking of using GitHub Actions for this, as they make it very easy to implement and automate workflows as per our requirement. Our workflow will do the following:&lt;br /&gt;
* Action will trigger whenever we make a commit or a pull request to the main/master branch.&lt;br /&gt;
* The action will compile the project using 'maven build' command and store the output jar inside project folder.&lt;br /&gt;
* We will use another action to email that jar to all the respective stakeholders (alternate solution could be to make it publicly accessible using GitHub pages).&lt;br /&gt;
* In case of a pull request, we will create a testing build so that it doesn't break any functionality and the stable build is accessible to those who want that.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following Junit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_5.png&amp;diff=144338</id>
		<title>File:S 2201 5.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_5.png&amp;diff=144338"/>
		<updated>2022-04-06T18:53:58Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144318</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144318"/>
		<updated>2022-04-06T17:11:29Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; &amp;amp;nbsp; File is formatted properly. Additionally, undesired characters have been removed.]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
Currently, the project does not have any integrated build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven. We will be adding a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Production - This profile goes hand in hand with the automated builds on Travis CI. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_5.jpg|800px|thumb|center| &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Different profiles in maven. &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; &amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;Maven build life cycle. ]]&lt;br /&gt;
&lt;br /&gt;
Since the project is not used as a dependency anywhere else we don't plan to set up a deployment to the maven central repository.&lt;br /&gt;
&lt;br /&gt;
==Test Plan==&lt;br /&gt;
The tasks involve minimal code changes and require adding build/deployment functionality. For the code changes(Copy any system.err output to a file in the /evaluations folder instead of going to the console/GUI window.) we plan to add the following Junit test:&lt;br /&gt;
* Create the wrong DAO object and check if a file with the relevant message is created correspondingly.&lt;br /&gt;
&lt;br /&gt;
The rest of the tasks involve Manual testing where we will be manually triggering the builds etc. to check if the purpose of the task is met.&lt;br /&gt;
&lt;br /&gt;
==Team==&lt;br /&gt;
Jackson Hardy(jmhardy3)&amp;lt;br&amp;gt;&lt;br /&gt;
Rachit Sharma(rsharm26) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur(sthakur5) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh(ssingh54) &amp;lt;br&amp;gt;&lt;br /&gt;
'''Mentor:''' Dr. Paul Wagner&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_5.jpg&amp;diff=144292</id>
		<title>File:S 2201 5.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_5.jpg&amp;diff=144292"/>
		<updated>2022-04-06T14:36:29Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144192</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144192"/>
		<updated>2022-04-06T03:12:17Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
Currently, the project does not have any build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven and need to add a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Production - This profile goes hand in hand with the automated builds on Travis CI. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Thinking if we will allow user to run mvn deploy. SQLFE can have versioning and releases after setting up the deployment. Or can we have travis to //deploy and have versioning?&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144084</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144084"/>
		<updated>2022-04-05T21:26:44Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection, and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Task 3===&lt;br /&gt;
Currently, the project does not have any build tool. We need to manually download the jars, build the project and run the jar. Instead, we want to automate the build process using the maven build tool. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Proposed Solution ====&lt;br /&gt;
We need to migrate the project to maven and need to add a pom.xml file correspondingly. We are going to add three kinds of profiles:&lt;br /&gt;
&lt;br /&gt;
* Development -  This profile will be used when a developer is developing or making changes to the application.&lt;br /&gt;
* Testing - This profile triggers all the unit test cases that have been written and gives a consolidated output for the same.&lt;br /&gt;
* Production - This profile goes hand in hand with the automated builds on Travis CI. The configuration specified here is used when building the application using the CI build.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
// Thinking if we will allow user to run mvn deploy. SQLFE can have versioning and releases after setting up the deployment. Or can we have travis to //deploy and have versioning?&lt;br /&gt;
{{multiple image| width = 200&lt;br /&gt;
 | image1=s_2201_3.png | alt1=2&lt;br /&gt;
 | image1=s_2201_4.png | alt1=3}}&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_4.png&amp;diff=144083</id>
		<title>File:S 2201 4.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_4.png&amp;diff=144083"/>
		<updated>2022-04-05T21:23:16Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_3.png&amp;diff=144072</id>
		<title>File:S 2201 3.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_3.png&amp;diff=144072"/>
		<updated>2022-04-05T20:43:06Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144071</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144071"/>
		<updated>2022-04-05T20:28:31Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Assignment.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144070</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144070"/>
		<updated>2022-04-05T20:28:22Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Assignment.java */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
*&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144069</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=144069"/>
		<updated>2022-04-05T20:28:07Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
The technologies used include Maven, Junit, Java, MySQL ,Oracledb. Java is a high level object oriented programming language that is mainly used for back-end server-side development. Java is used in this project to write the underlying program used to assist professors in grading SQL student submissions.  Maven is a build automation tool used for building and managing Java based projects. With Maven, the user can have different build profiles to set up different configurations of the Java project used for testing, development, and deployment configurations. Maven has POM files that are basically XML files that contain information related to the project and configuration like dependencies, source directory, plugin, and goals. Junit is a unit testing framework. Similar to Rspec for Ruby, Junit allows the user to automate unit testing to ensure that the classes work well for a system using Java. Oracledb, like any database, is a collection of structured data. This is different from MySQL, which was previously used to store the data on this particular project. However, both database platforms essentially serve the same purpose. In comparison, Oracledb supports parallel and distributed databases and also better indexing than MySQL. Though, MySQL is said to be more configurable, the commercially used Oracledb is the selected relational database management system for this particular project.&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;br /&gt;
&lt;br /&gt;
===Task 2===&lt;br /&gt;
Add the JUnit test case coverage for the general SQLFE package. We are aiming to add unit tests for Assignment, FrontEnd, SubmissionCollection and TestResult classes.&lt;br /&gt;
&lt;br /&gt;
Once the design feature is further pushed to development, this page will be updated with specific code regarding the JUnit test cases desired for this feature. Until then, the following are outlined below:&lt;br /&gt;
&lt;br /&gt;
=====Assignment.java=====&lt;br /&gt;
* &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143942</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143942"/>
		<updated>2022-04-04T17:23:43Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|800px|thumb|center|&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp;&amp;amp;nbsp; Unformatted AAA_grade_summary.out file. There is no indentation and unwanted commas are present to the end.]]&lt;br /&gt;
&lt;br /&gt;
====Proposed Output====&lt;br /&gt;
For a cleaner experience, we are going to remove the commas at the end of the lines. Also, we are going to change the alignment of the lines such that they all are indented in the correct manner.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_2.png|800px|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
Similar changes will be done for each student's output file.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143889</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143889"/>
		<updated>2022-04-01T02:49:12Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;br /&gt;
&lt;br /&gt;
[[File:s_2201_1.png|thumb|left|alt text]]&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_2.png&amp;diff=143888</id>
		<title>File:S 2201 2.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_2.png&amp;diff=143888"/>
		<updated>2022-04-01T02:45:01Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_1.png&amp;diff=143887</id>
		<title>File:S 2201 1.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:S_2201_1.png&amp;diff=143887"/>
		<updated>2022-04-01T02:43:54Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143886</id>
		<title>CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2201:_Improving_User_Experience_for_SQLFE&amp;diff=143886"/>
		<updated>2022-04-01T02:43:22Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: Created page with &amp;quot;== About SQLFE==  SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, l...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Technologies Used ==&lt;br /&gt;
&lt;br /&gt;
== Tasks ==&lt;br /&gt;
The project tasks range over several smaller tasks with a cumulative effort directed towards improving the user experience and setting up better processes.&lt;br /&gt;
&lt;br /&gt;
===Task 1===&lt;br /&gt;
Improve the formatting of the query and feedback output in each individual evaluation output file. &lt;br /&gt;
&lt;br /&gt;
====Current Implementation====&lt;br /&gt;
The evaluation files that are generated have a randomly formatted output which is hard to read and is not user-friendly.&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143885</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143885"/>
		<updated>2022-04-01T02:07:51Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Final Projects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2200: Testing advice_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2208: Testing for submission_records_controller, profile_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2225: Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2221: Refactor submitted content controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2206: Testing for users_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2207: Testing for submitted_content_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2205: Testing for participants_controller, versions_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2212: Testing for hamer.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2222: Refactor impersonate_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2202- Testing for badges_controller, publishing_controller]]&lt;br /&gt;
*[[CSC/ECE 517 Spring 2022 - E2220: Refactor reputation_web_service_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2224: Refactor review_mapping_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2209: Testing for analytic helper.rb, join team requests helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2227: SQL Injection Fix]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2223. Refactor sign up sheet controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2201: Testing for assignment_questionnaire_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2243. Refactor student_teams functionality]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2245: View for results of bidding]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2241: Heatgrid fixes and improvements]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2237: Grading audit trail]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2201: Improving User Experience for SQLFE]]&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143550</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143550"/>
		<updated>2022-03-22T23:26:27Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* JUnit Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes:&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;br /&gt;
&lt;br /&gt;
== Test Plan ==&lt;br /&gt;
We wrote test cases for Backend.java class, particulary for the evaluate method. The tests are discussed below.&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Here we do initial setup of the unit test and create a test object for backend class.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@Before&lt;br /&gt;
public void setup() {&lt;br /&gt;
    Utilities.forTesting = true;&lt;br /&gt;
    backEnd.createTestObject(testDAO, mainFolderPath);&lt;br /&gt;
    System.setErr(new PrintStream(errContent));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output files check ===&lt;br /&gt;
This test checks if the number of output lines generated is the same as the number of input files. The additional 2 is because of the header of output file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int numberOfFiles = Objects.requireNonNull(new File(backEndSubmissionPath).list()).length;&lt;br /&gt;
long lineCount;&lt;br /&gt;
try (Stream&amp;lt;String&amp;gt; stream = Files.lines(Paths.get(gradesFileName), StandardCharsets.UTF_8)) {&lt;br /&gt;
    lineCount = stream.count();&lt;br /&gt;
}&lt;br /&gt;
assertEquals(lineCount,numberOfFiles+2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submission output has grade === &lt;br /&gt;
This test asserts that every question has been graded for any given submission. It compares the number of delimiter(,) in a line against the total number of questions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// test for each submission the output should contain grade for each question&lt;br /&gt;
Assignment a = backEnd.createAssignment(mainFolderPath + &amp;quot;/assignmentProperties-MySQL&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// iterate through the list of questions.&lt;br /&gt;
for( Question question: a.getQuestions()){&lt;br /&gt;
    // get the question number&lt;br /&gt;
    Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
    //Add the question to the map.&lt;br /&gt;
    questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
    questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int questions= questionToAnswer.size();&lt;br /&gt;
Scanner scanner = new Scanner(new File(gradesFileName));&lt;br /&gt;
int lineNo=0;&lt;br /&gt;
while (scanner.hasNextLine()) {&lt;br /&gt;
    String line = scanner.nextLine();&lt;br /&gt;
    if(lineNo&amp;gt;=2){&lt;br /&gt;
        String[] arrOfStr = line.split(&amp;quot;:&amp;quot;);&lt;br /&gt;
        assertEquals(arrOfStr.length,3);&lt;br /&gt;
        int freqComma =0;&lt;br /&gt;
        for(int i=0;i&amp;lt;arrOfStr[2].length();i++){&lt;br /&gt;
            if(arrOfStr[2].charAt(i)==',')&lt;br /&gt;
                freqComma++;&lt;br /&gt;
        }&lt;br /&gt;
        assertEquals(freqComma,questions);&lt;br /&gt;
    }&lt;br /&gt;
    lineNo++;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid paths ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid folder paths&lt;br /&gt;
backEnd.setSubmissionFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.setEvaluationFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Error in reading submission collection\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&lt;br /&gt;
errContent.reset();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid DAO ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid DAO object&lt;br /&gt;
IDAO invalidDAO = new MySQL80DataAccessObject(&amp;quot;localhost&amp;quot;, &amp;quot;3306&amp;quot;, &amp;quot;sqlf&amp;quot;, &amp;quot;roo&amp;quot;, &amp;quot;&amp;quot;, true);&lt;br /&gt;
backEnd.createTestObject(invalidDAO, mainFolderPath);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Invalid database properties\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grade summary output file ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Test for grade submission, the output file should match are predefined one to pass&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(Files.readAllLines(Paths.get(gradesTestFile)), Files.readAllLines(Paths.get(gradesFileName)));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GitHub Links ==&lt;br /&gt;
Link to SQLFE repository: [https://github.com/wagnerpj42/sql-file-evaluation here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Sakshamrzt/SQL-File-Evaluation here]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
Prof. Paul Wagner (wagnerpj@uwec.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Rachit Sharma(rsharm26@ncsu.edu ) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur (sthakur5@ncsu.edu) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh (ssingh54@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143425</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143425"/>
		<updated>2022-03-22T00:31:23Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* GitHub Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes:&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;br /&gt;
&lt;br /&gt;
== JUnit Testing ==&lt;br /&gt;
We wrote test cases for Backend.java class, particulary for the evaluate method. The tests are discussed below.&lt;br /&gt;
=== Setup ===&lt;br /&gt;
Here we do initial setup of the unit test and create a test object for backend class.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@Before&lt;br /&gt;
public void setup() {&lt;br /&gt;
    Utilities.forTesting = true;&lt;br /&gt;
    backEnd.createTestObject(testDAO, mainFolderPath);&lt;br /&gt;
    System.setErr(new PrintStream(errContent));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output files check ===&lt;br /&gt;
This test checks if the number of output lines generated is the same as the number of input files. The additional 2 is because of the header of output file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int numberOfFiles = Objects.requireNonNull(new File(backEndSubmissionPath).list()).length;&lt;br /&gt;
long lineCount;&lt;br /&gt;
try (Stream&amp;lt;String&amp;gt; stream = Files.lines(Paths.get(gradesFileName), StandardCharsets.UTF_8)) {&lt;br /&gt;
    lineCount = stream.count();&lt;br /&gt;
}&lt;br /&gt;
assertEquals(lineCount,numberOfFiles+2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submission output has grade === &lt;br /&gt;
This test asserts that every question has been graded for any given submission. It compares the number of delimiter(,) in a line against the total number of questions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// test for each submission the output should contain grade for each question&lt;br /&gt;
Assignment a = backEnd.createAssignment(mainFolderPath + &amp;quot;/assignmentProperties-MySQL&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// iterate through the list of questions.&lt;br /&gt;
for( Question question: a.getQuestions()){&lt;br /&gt;
    // get the question number&lt;br /&gt;
    Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
    //Add the question to the map.&lt;br /&gt;
    questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
    questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int questions= questionToAnswer.size();&lt;br /&gt;
Scanner scanner = new Scanner(new File(gradesFileName));&lt;br /&gt;
int lineNo=0;&lt;br /&gt;
while (scanner.hasNextLine()) {&lt;br /&gt;
    String line = scanner.nextLine();&lt;br /&gt;
    if(lineNo&amp;gt;=2){&lt;br /&gt;
        String[] arrOfStr = line.split(&amp;quot;:&amp;quot;);&lt;br /&gt;
        assertEquals(arrOfStr.length,3);&lt;br /&gt;
        int freqComma =0;&lt;br /&gt;
        for(int i=0;i&amp;lt;arrOfStr[2].length();i++){&lt;br /&gt;
            if(arrOfStr[2].charAt(i)==',')&lt;br /&gt;
                freqComma++;&lt;br /&gt;
        }&lt;br /&gt;
        assertEquals(freqComma,questions);&lt;br /&gt;
    }&lt;br /&gt;
    lineNo++;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid paths ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid folder paths&lt;br /&gt;
backEnd.setSubmissionFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.setEvaluationFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Error in reading submission collection\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&lt;br /&gt;
errContent.reset();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid DAO ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid DAO object&lt;br /&gt;
IDAO invalidDAO = new MySQL80DataAccessObject(&amp;quot;localhost&amp;quot;, &amp;quot;3306&amp;quot;, &amp;quot;sqlf&amp;quot;, &amp;quot;roo&amp;quot;, &amp;quot;&amp;quot;, true);&lt;br /&gt;
backEnd.createTestObject(invalidDAO, mainFolderPath);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Invalid database properties\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grade summary output file ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Test for grade submission, the output file should match are predefined one to pass&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(Files.readAllLines(Paths.get(gradesTestFile)), Files.readAllLines(Paths.get(gradesFileName)));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GitHub Links ==&lt;br /&gt;
Link to SQLFE repository: [https://github.com/wagnerpj42/sql-file-evaluation here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/Sakshamrzt/SQL-File-Evaluation here]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
Prof. Paul Wagner (wagnerpj@uwec.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Rachit Sharma(rsharm26@ncsu.edu ) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur (sthakur5@ncsu.edu) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh (ssingh54@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143187</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143187"/>
		<updated>2022-03-21T20:21:00Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* Team Members */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes:&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;br /&gt;
&lt;br /&gt;
== JUnit Testing ==&lt;br /&gt;
We wrote test cases for Backend.java class, particulary for the evaluate method. The tests are discussed below.&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@Before&lt;br /&gt;
public void setup() {&lt;br /&gt;
    Utilities.forTesting = true;&lt;br /&gt;
    backEnd.createTestObject(testDAO, mainFolderPath);&lt;br /&gt;
    System.setErr(new PrintStream(errContent));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output files check ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int numberOfFiles = Objects.requireNonNull(new File(backEndSubmissionPath).list()).length;&lt;br /&gt;
long lineCount;&lt;br /&gt;
try (Stream&amp;lt;String&amp;gt; stream = Files.lines(Paths.get(gradesFileName), StandardCharsets.UTF_8)) {&lt;br /&gt;
    lineCount = stream.count();&lt;br /&gt;
}&lt;br /&gt;
assertEquals(lineCount,numberOfFiles+2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submission output has grade === &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// test for each submission the output should contain grade for each question&lt;br /&gt;
Assignment a = backEnd.createAssignment(mainFolderPath + &amp;quot;/assignmentProperties-MySQL&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// iterate through the list of questions.&lt;br /&gt;
for( Question question: a.getQuestions()){&lt;br /&gt;
    // get the question number&lt;br /&gt;
    Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
    //Add the question to the map.&lt;br /&gt;
    questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
    questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int questions= questionToAnswer.size();&lt;br /&gt;
Scanner scanner = new Scanner(new File(gradesFileName));&lt;br /&gt;
int lineNo=0;&lt;br /&gt;
while (scanner.hasNextLine()) {&lt;br /&gt;
    String line = scanner.nextLine();&lt;br /&gt;
    if(lineNo&amp;gt;=2){&lt;br /&gt;
        String[] arrOfStr = line.split(&amp;quot;:&amp;quot;);&lt;br /&gt;
        assertEquals(arrOfStr.length,3);&lt;br /&gt;
        int freqComma =0;&lt;br /&gt;
        for(int i=0;i&amp;lt;arrOfStr[2].length();i++){&lt;br /&gt;
            if(arrOfStr[2].charAt(i)==',')&lt;br /&gt;
                freqComma++;&lt;br /&gt;
        }&lt;br /&gt;
        assertEquals(freqComma,questions);&lt;br /&gt;
    }&lt;br /&gt;
    lineNo++;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Invalid paths ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid folder paths&lt;br /&gt;
backEnd.setSubmissionFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.setEvaluationFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Error in reading submission collection\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&lt;br /&gt;
errContent.reset();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid DAO ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid DAO object&lt;br /&gt;
IDAO invalidDAO = new MySQL80DataAccessObject(&amp;quot;localhost&amp;quot;, &amp;quot;3306&amp;quot;, &amp;quot;sqlf&amp;quot;, &amp;quot;roo&amp;quot;, &amp;quot;&amp;quot;, true);&lt;br /&gt;
backEnd.createTestObject(invalidDAO, mainFolderPath);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Invalid database properties\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grade summary output file ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Test for grade submission, the output file should match are predefined one to pass&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(Files.readAllLines(Paths.get(gradesTestFile)), Files.readAllLines(Paths.get(gradesFileName)));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GitHub Links ==&lt;br /&gt;
Link to SQLFE repository: [https://www.uwec.edu/profiles/wagnerpj/ here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/wagnerpj42/sql-file-evaluation here]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
Prof. Paul Wagner (wagnerpj@uwec.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Rachit Sharma(rsharm26@ncsu.edu ) &amp;lt;br&amp;gt;&lt;br /&gt;
Saksham Thakur (sthakur5@ncsu.edu) &amp;lt;br&amp;gt;&lt;br /&gt;
Shubhender Singh (ssingh54@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143186</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143186"/>
		<updated>2022-03-21T20:20:33Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes:&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;br /&gt;
&lt;br /&gt;
== JUnit Testing ==&lt;br /&gt;
We wrote test cases for Backend.java class, particulary for the evaluate method. The tests are discussed below.&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
@Before&lt;br /&gt;
public void setup() {&lt;br /&gt;
    Utilities.forTesting = true;&lt;br /&gt;
    backEnd.createTestObject(testDAO, mainFolderPath);&lt;br /&gt;
    System.setErr(new PrintStream(errContent));&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Output files check ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
int numberOfFiles = Objects.requireNonNull(new File(backEndSubmissionPath).list()).length;&lt;br /&gt;
long lineCount;&lt;br /&gt;
try (Stream&amp;lt;String&amp;gt; stream = Files.lines(Paths.get(gradesFileName), StandardCharsets.UTF_8)) {&lt;br /&gt;
    lineCount = stream.count();&lt;br /&gt;
}&lt;br /&gt;
assertEquals(lineCount,numberOfFiles+2);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Submission output has grade === &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// test for each submission the output should contain grade for each question&lt;br /&gt;
Assignment a = backEnd.createAssignment(mainFolderPath + &amp;quot;/assignmentProperties-MySQL&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// iterate through the list of questions.&lt;br /&gt;
for( Question question: a.getQuestions()){&lt;br /&gt;
    // get the question number&lt;br /&gt;
    Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
    //Add the question to the map.&lt;br /&gt;
    questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
    questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int questions= questionToAnswer.size();&lt;br /&gt;
Scanner scanner = new Scanner(new File(gradesFileName));&lt;br /&gt;
int lineNo=0;&lt;br /&gt;
while (scanner.hasNextLine()) {&lt;br /&gt;
    String line = scanner.nextLine();&lt;br /&gt;
    if(lineNo&amp;gt;=2){&lt;br /&gt;
        String[] arrOfStr = line.split(&amp;quot;:&amp;quot;);&lt;br /&gt;
        assertEquals(arrOfStr.length,3);&lt;br /&gt;
        int freqComma =0;&lt;br /&gt;
        for(int i=0;i&amp;lt;arrOfStr[2].length();i++){&lt;br /&gt;
            if(arrOfStr[2].charAt(i)==',')&lt;br /&gt;
                freqComma++;&lt;br /&gt;
        }&lt;br /&gt;
        assertEquals(freqComma,questions);&lt;br /&gt;
    }&lt;br /&gt;
    lineNo++;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
=== Invalid paths ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid folder paths&lt;br /&gt;
backEnd.setSubmissionFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.setEvaluationFolderPath(&amp;quot;invalidPath&amp;quot;);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Error in reading submission collection\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&lt;br /&gt;
errContent.reset();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Invalid DAO ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// invalid DAO object&lt;br /&gt;
IDAO invalidDAO = new MySQL80DataAccessObject(&amp;quot;localhost&amp;quot;, &amp;quot;3306&amp;quot;, &amp;quot;sqlf&amp;quot;, &amp;quot;roo&amp;quot;, &amp;quot;&amp;quot;, true);&lt;br /&gt;
backEnd.createTestObject(invalidDAO, mainFolderPath);&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(&amp;quot;Invalid database properties\n&amp;quot;.trim(), errContent.toString().trim());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Grade summary output file ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
//Test for grade submission, the output file should match are predefined one to pass&lt;br /&gt;
backEnd.evaluate();&lt;br /&gt;
assertEquals(Files.readAllLines(Paths.get(gradesTestFile)), Files.readAllLines(Paths.get(gradesFileName)));&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== GitHub Links ==&lt;br /&gt;
Link to SQLFE repository: [https://www.uwec.edu/profiles/wagnerpj/ here]&lt;br /&gt;
&lt;br /&gt;
Link to the forked repository: [https://github.com/wagnerpj42/sql-file-evaluation here]&lt;br /&gt;
&lt;br /&gt;
== Project Mentor ==&lt;br /&gt;
Prof. Paul Wagner (wagnerpj@uwec.edu)&lt;br /&gt;
&lt;br /&gt;
== Team Members ==&lt;br /&gt;
Rachit Sharma(rsharm26@ncsu.edu )&lt;br /&gt;
Saksham Thakur (sthakur5@ncsu.edu)&lt;br /&gt;
Shubhender Singh (ssingh54@ncsu.edu)&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143147</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143147"/>
		<updated>2022-03-21T15:41:54Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes:&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143146</id>
		<title>CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022_-_S2200:_Refactoring_evaluation_of_SQL_queries_(Java/JUnit)&amp;diff=143146"/>
		<updated>2022-03-21T15:41:23Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: Created page with &amp;quot;== About SQLFE==  SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, l...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== About SQLFE==&lt;br /&gt;
&lt;br /&gt;
SQL File Evaluation (SQLFE) is an open-source tool that helps in the flexible scoring of multiple SQL queries in multiple submitted files from assignments, lab tests, or other work. It was developed by [https://www.uwec.edu/profiles/wagnerpj/ Prof. Paul Wagner] at [https://www.uwec.edu/ University Of Wisconsin Eau Claire]. This tool has features to support the automated grading of the SQL assignments. It allows partial grading of the question to fairly grade the students and also allows students to provide comments, and multiple solutions to the same problem.&lt;br /&gt;
&lt;br /&gt;
== Description about the project ==&lt;br /&gt;
This page is a description of SQLFE OSS project S2200 which is Refactoring evaluation of SQL queries (Java/JUnit) and writing test cases for the changes made. SQLFE is an SQL evaluation and grading solution. The core of the functionality deals with going through all the submissions and getting the output for a student's solution via SQL and comparing the output with the desired one. This involves calling the evaluate function which has high complexity and is almost non-readable. Our project primarily focuses on refactoring the complex evaluate function to reduce the complexity by breaking it up into several functions, each dealing with a specific part of the functionality. The goal of this project is to attempt to make this part of the application easier to read and maintain. We have also optimized the code by removing the redundant calls to the same operation and storing the output.&lt;br /&gt;
&lt;br /&gt;
== Files modified in current project ==&lt;br /&gt;
BackEnd.java;&lt;br /&gt;
QueryEvaluationLists.java;&lt;br /&gt;
AbstractTest.java;&lt;br /&gt;
BackEndTest.java&lt;br /&gt;
&lt;br /&gt;
=== BackEnd.java ===&lt;br /&gt;
This file receives the SQL connection details and assignment details from the frontend and performs the grading for all the students.&lt;br /&gt;
&lt;br /&gt;
====List Of Changes====&lt;br /&gt;
We worked on the following changes(CI):&amp;lt;br/&amp;gt; &lt;br /&gt;
=====Change 1=====&lt;br /&gt;
The calculation of the questions to the possible answer was happening redundantly which was impacting the performance. We moved this code to a separate function and are now using a map to store the question to answer values.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
while (qIndex &amp;lt; questions.size() &amp;amp;&amp;amp; !foundAll) {&lt;br /&gt;
	// first match&lt;br /&gt;
	if (!foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		foundOne = true;&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// use this question&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) == 0) {&lt;br /&gt;
		currQuestions.add(questions.get(qIndex));		// add this question too&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// first non-match after subsequent match&lt;br /&gt;
	else if (foundOne &amp;amp;&amp;amp; questions.get(qIndex).getQNumStr().indexOf(qa.getQNumStr()) != 0) {&lt;br /&gt;
		foundAll = true;&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
	// not a match&lt;br /&gt;
	else {&lt;br /&gt;
		qIndex++;&lt;br /&gt;
	}&lt;br /&gt;
}	// end - while looking for question(s) to match student answer&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above operation was happening redundantly for each student. We have moved this code to a separate function which is called in the preprocessing phase. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/** Method to create a map of questions&lt;br /&gt;
 *&lt;br /&gt;
 * @param questions Array list containing a list of questions.&lt;br /&gt;
 * @return Arraylist from Integer(question number) to list of questions.&lt;br /&gt;
 */&lt;br /&gt;
Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt; createQuestionToAnswer(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
	Map&amp;lt;Integer, ArrayList&amp;lt;Question&amp;gt;&amp;gt;  questionToAnswer = new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
	// iterate through the list of questions.&lt;br /&gt;
	for( Question question: questions){&lt;br /&gt;
		// get the question number&lt;br /&gt;
		Integer questionNo = Integer.parseInt(String.valueOf(question.getQNumStr().charAt(0)));&lt;br /&gt;
&lt;br /&gt;
		//Add the question to the map.&lt;br /&gt;
		questionToAnswer.putIfAbsent(questionNo, new ArrayList&amp;lt;&amp;gt;());&lt;br /&gt;
		questionToAnswer.get(questionNo).add(question);&lt;br /&gt;
	}&lt;br /&gt;
	return questionToAnswer;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This function creates a map and we can directly use this map to get currQuestions.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
currQuestions = questionToAnswer.getOrDefault(questionNo, null);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 2=====&lt;br /&gt;
The calculation of the evaluation array lists was happening redundantly for each student. We have separated out this part and have created a separate class. This has improved the readability and we are now avoiding doing redundant operations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ArrayList&amp;lt;ISQLTest&amp;gt; questionTests = new ArrayList&amp;lt;ISQLTest&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;Integer&amp;gt; questionPcts  = new ArrayList&amp;lt;Integer&amp;gt;();&lt;br /&gt;
ArrayList&amp;lt;String&amp;gt; questionConditions = new ArrayList&amp;lt;String&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
// evaluate all tests for this question&lt;br /&gt;
for (int tiqIndex = 0; tiqIndex &amp;lt; questionEvalComps.size(); tiqIndex++) {&lt;br /&gt;
	// get test names&lt;br /&gt;
	String currTestName = questionEvalComps.get(tiqIndex).getEvalComponentName();&lt;br /&gt;
	currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
	// make test object out of test name&lt;br /&gt;
	try {&lt;br /&gt;
		Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
		Object oTest = aClass.newInstance();&lt;br /&gt;
		ISQLTest test = (ISQLTest)oTest;&lt;br /&gt;
		questionTests.add(test);&lt;br /&gt;
	}&lt;br /&gt;
	catch (Exception e) {&lt;br /&gt;
		System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	// get percents&lt;br /&gt;
	int currTestPct = questionEvalComps.get(tiqIndex).getPercent();&lt;br /&gt;
	questionPcts.add(currTestPct);&lt;br /&gt;
	&lt;br /&gt;
	// get condition&lt;br /&gt;
	String currTestCondition = questionEvalComps.get(tiqIndex).getCondition();&lt;br /&gt;
	questionConditions.add(currTestCondition);&lt;br /&gt;
}	// end - for each test in question&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We have created a &amp;lt;b&amp;gt;new class &amp;lt;/b&amp;gt; for keeping the query evaluation arraylists. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/*&lt;br /&gt;
 * QueryEvaluationLists - class that holds query evaluation params.&lt;br /&gt;
 *&lt;br /&gt;
 * Created - 1-Mar-2022&lt;br /&gt;
 */&lt;br /&gt;
package sqlfe.general;&lt;br /&gt;
&lt;br /&gt;
import sqlfe.sqltests.ISQLTest;&lt;br /&gt;
&lt;br /&gt;
import java.util.ArrayList;&lt;br /&gt;
import java.util.HashMap;&lt;br /&gt;
import java.util.Map;&lt;br /&gt;
&lt;br /&gt;
public class QueryEvaluationLists {&lt;br /&gt;
&lt;br /&gt;
    // List that holds query evaluations params.&lt;br /&gt;
    final private ArrayList&amp;lt;ISQLTest&amp;gt; questionTests ;&lt;br /&gt;
    final private ArrayList&amp;lt;Integer&amp;gt; questionPcts  ;&lt;br /&gt;
    final private ArrayList&amp;lt;String&amp;gt; questionConditions ;&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    // constructors&lt;br /&gt;
    // all-args constructor&lt;br /&gt;
    public QueryEvaluationLists(ArrayList&amp;lt;ISQLTest&amp;gt; questionTests, ArrayList&amp;lt;Integer&amp;gt; questionPcts, ArrayList&amp;lt;String&amp;gt; questionConditions) {&lt;br /&gt;
        this.questionTests = questionTests;&lt;br /&gt;
        this.questionPcts = questionPcts;&lt;br /&gt;
        this.questionConditions = questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // methods&lt;br /&gt;
    //default constructor&lt;br /&gt;
    public QueryEvaluationLists() {&lt;br /&gt;
        this.questionTests = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionPcts = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
        this.questionConditions = new ArrayList&amp;lt;&amp;gt;();&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;ISQLTest&amp;gt; getQuestionTests(){&lt;br /&gt;
        return this.questionTests;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;Integer&amp;gt; getQuestionPcts(){&lt;br /&gt;
        return this.questionPcts;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    public ArrayList&amp;lt;String&amp;gt; getQuestionConditions(){&lt;br /&gt;
        return this.questionConditions;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    /**&lt;br /&gt;
     * Create a map for the holding question number to metrics . This functions does preprocessing.&lt;br /&gt;
     * @param questions. A list that holds objects containing data.&lt;br /&gt;
     * @return the map holding data&lt;br /&gt;
     */&lt;br /&gt;
    public Map&amp;lt;String,QueryEvaluationLists&amp;gt; createQuestionNoToEvaluationMetricsMap(ArrayList&amp;lt;Question&amp;gt; questions) {&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        Map&amp;lt;String,QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics= new HashMap&amp;lt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
        // iterate through the list of questions.&lt;br /&gt;
        for (Question question:questions) {&lt;br /&gt;
            // get the question number&lt;br /&gt;
            String questionName=question.getQNumStr();&lt;br /&gt;
            // create object to hold the data.&lt;br /&gt;
            QueryEvaluationLists queryEvaluationLists= new QueryEvaluationLists();&lt;br /&gt;
&lt;br /&gt;
            // Get all the tests corresponding to the question.&lt;br /&gt;
            ArrayList&amp;lt;EvalComponentInQuestion&amp;gt; questionEvalComps = question.getTests();&lt;br /&gt;
&lt;br /&gt;
            for (EvalComponentInQuestion questionEvalComp : questionEvalComps) {&lt;br /&gt;
                // get test names&lt;br /&gt;
                String currTestName = questionEvalComp.getEvalComponentName();&lt;br /&gt;
                currTestName = &amp;quot;sqlfe.sqltests.&amp;quot; + currTestName;&lt;br /&gt;
&lt;br /&gt;
                // make test object out of test name&lt;br /&gt;
                try {&lt;br /&gt;
                    Class&amp;lt;?&amp;gt; aClass = Class.forName(currTestName);&lt;br /&gt;
                    Object oTest = aClass.newInstance();&lt;br /&gt;
                    ISQLTest test = (ISQLTest) oTest;&lt;br /&gt;
                    queryEvaluationLists.questionTests.add(test);&lt;br /&gt;
                } catch (Exception e) {&lt;br /&gt;
                    System.out.println(&amp;quot;exception in generating class object from name&amp;quot;);&lt;br /&gt;
                }&lt;br /&gt;
&lt;br /&gt;
                // get percents&lt;br /&gt;
                int currTestPct = questionEvalComp.getPercent();&lt;br /&gt;
                queryEvaluationLists.questionPcts.add(currTestPct);&lt;br /&gt;
&lt;br /&gt;
                // get condition&lt;br /&gt;
                String currTestCondition = questionEvalComp.getCondition();&lt;br /&gt;
                queryEvaluationLists.questionConditions.add(currTestCondition);&lt;br /&gt;
            }    // end - for each test in question&lt;br /&gt;
&lt;br /&gt;
            questionNoToEvaluationMetrics.put(questionName,queryEvaluationLists);&lt;br /&gt;
&lt;br /&gt;
        }&lt;br /&gt;
        return questionNoToEvaluationMetrics;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After this change, we can simply get the map of the current questions by using the question number.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Map&amp;lt;String, QueryEvaluationLists&amp;gt; questionNoToEvaluationMetrics = queryEvaluationLists.createQuestionNoToEvaluationMetricsMap(questions);&lt;br /&gt;
queryEvaluationLists = questionNoToEvaluationMetrics.get(currQuestion.getQNumStr());&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=====Change 3 =====&lt;br /&gt;
The evaluate function was performing all the activities involving the grading of students. The tasks involved were:&amp;lt;br&amp;gt;&lt;br /&gt;
1. Initialize the variables like gradesWriter which writes to the UI, load the submission corpus.&lt;br /&gt;
2. Go through all the submissions. &lt;br /&gt;
3. For each individual submission go through all the questions.&lt;br /&gt;
4. Grade each question.&lt;br /&gt;
5. Calculate the overall score for the assignment and write to the output file.&lt;br /&gt;
&lt;br /&gt;
As we can see the evaluate method is responsible for multiple functionalities. Owing to this the complexity is high with low readability. We have split the evaluate functions into several smaller functions.&lt;br /&gt;
&lt;br /&gt;
1. evaluate &amp;lt;br&amp;gt;&lt;br /&gt;
2. goThroughAllSubmissions &amp;lt;br&amp;gt;&lt;br /&gt;
3. gradeSubmission&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143144</id>
		<title>CSC/ECE 517 Spring 2022</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Spring_2022&amp;diff=143144"/>
		<updated>2022-03-21T13:54:04Z</updated>

		<summary type="html">&lt;p&gt;Sthakur5: /* OSS Projects */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== OSS Projects ==&lt;br /&gt;
&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2203: Adding tests for courses_controller, eula_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2204: Adding tests for markup_styles_controller, lock_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2218: Refactor response_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2217: Refactor questionnaires_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2216: Refactor late_policies_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2215: Refactor student_quizzes_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor teams_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2219: Improve assessment360_controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2211: Testing for summary_helper]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2214: Refactor review_mapping_helper.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2221: Refactor submitted content controller.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2206: Testing for users_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2205: Testing for participants_controller, versions_controller]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - E2212: Testing for hamer.rb]]&lt;br /&gt;
* [[CSC/ECE 517 Spring 2022 - S2200: Refactoring evaluation of SQL queries (Java/JUnit)]]&lt;br /&gt;
&lt;br /&gt;
== Final Projects ==&lt;/div&gt;</summary>
		<author><name>Sthakur5</name></author>
	</entry>
</feed>