<?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=Vpaul</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=Vpaul"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vpaul"/>
	<updated>2026-06-13T20:29:45Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99923</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99923"/>
		<updated>2015-11-14T04:39:32Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
===AJAX===&lt;br /&gt;
Ajax is the acronym for Asynchronous Javascript and XML. It is not a programming language or a tool but a concept. Using Ajax allows us to update parts of web page without updating the entire page. Ajax requires basic understanding of HTML and Javascript. Ajax is a client side script which communicates with a server without sharing the entire page over again. It allows web pages to be updated asynchronously by exchanging small pieces of information with the server. It is not visible to the user, but works on the back end. The general web pages which do not use Ajax, load the entire page over when part of new information is added. &lt;br /&gt;
Applications where AJAX is used: Google Maps, Gmail, Twitter, Facebook. Ajax is very popular now, and the reason being its user friendliness, increased speed of web page updating and efficiency is increased as well.&lt;br /&gt;
&lt;br /&gt;
Functionality of Ajax could be understood by the following diagram:&lt;br /&gt;
&lt;br /&gt;
[[File:AJAX.png]]&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
[[File:AssgnPart.png]]&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:Quest.png]]&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
[[File:TA.png]]&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user. It also demands scripting some server side code to handle the requests. We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
1. http://www.w3schools.com/Ajax/ajax_intro.asp&lt;br /&gt;
&lt;br /&gt;
2. http://www.seguetech.com/blog/2013/03/12/what-is-ajax-and-where-is-it-used-in-technology&lt;br /&gt;
&lt;br /&gt;
3. http://www.tutorialspoint.com/ajax/what_is_ajax.htm&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99920</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99920"/>
		<updated>2015-11-14T04:36:40Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
===AJAX===&lt;br /&gt;
Ajax is the acronym for Asynchronous Javascript and XML. It is not a programming language or a tool but a concept. Using Ajax allows us to update parts of web page without updating the entire page. Ajax requires basic understanding of HTML and Javascript. Ajax is a client side script which communicates with a server without sharing the entire page over again. It allows web pages to be updated asynchronously by exchanging small pieces of information with the server. It is not visible to the user, but works on the back end. The general web pages which do not use Ajax, load the entire page over when part of new information is added. &lt;br /&gt;
Applications where AJAX is used: Google Maps, Gmail, Twitter, Facebook. Ajax is very popular now, and the reason being its user friendliness, increased speed of web page updating and efficiency is increased as well.&lt;br /&gt;
&lt;br /&gt;
Functionality of Ajax could be understood by the following diagram:&lt;br /&gt;
&lt;br /&gt;
[[File:AJAX.png]]&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
[[File:AssgnPart.png]]&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:Quest.png]]&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
[[File:TA.png]]&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user. It also demands scripting some server side code to handle the requests. We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99919</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99919"/>
		<updated>2015-11-14T04:36:22Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
===AJAX===&lt;br /&gt;
Ajax is the acronym for Asynchronous Javascript and XML. It is not a programming language or a tool but a concept. Using Ajax allows us to update parts of web page without updating the entire page. Ajax requires basic understanding of HTML and Javascript. Ajax is a client side script which communicates with a server without sharing the entire page over again. It allows web pages to be updated asynchronously by exchanging small pieces of information with the server. It is not visible to the user, but works on the back end. The general web pages which do not use Ajax, load the entire page over when part of new information is added. &lt;br /&gt;
Applications where AJAX is used: Google Maps, Gmail, Twitter, Facebook. Ajax is very popular now, and the reason being its user friendliness, increased speed of web page updating and efficiency is increased as well.&lt;br /&gt;
&lt;br /&gt;
Functionality of Ajax could be understood by the following diagram:&lt;br /&gt;
[[File:AJAX.png]]&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
[[File:AssgnPart.png]]&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:Quest.png]]&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
[[File:TA.png]]&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user. It also demands scripting some server side code to handle the requests. We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:AJAX.png&amp;diff=99918</id>
		<title>File:AJAX.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:AJAX.png&amp;diff=99918"/>
		<updated>2015-11-14T04:35:31Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99917</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99917"/>
		<updated>2015-11-14T04:35:03Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
===AJAX===&lt;br /&gt;
Ajax is the acronym for Asynchronous Javascript and XML. It is not a programming language or a tool but a concept. Using Ajax allows us to update parts of web page without updating the entire page. Ajax requires basic understanding of HTML and Javascript. Ajax is a client side script which communicates with a server without sharing the entire page over again. It allows web pages to be updated asynchronously by exchanging small pieces of information with the server. It is not visible to the user, but works on the back end. The general web pages which do not use Ajax, load the entire page over when part of new information is added. &lt;br /&gt;
Applications where AJAX is used: Google Maps, Gmail, Twitter, Facebook. Ajax is very popular now, and the reason being its user friendliness, increased speed of web page updating and efficiency is increased as well.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
[[File:AssgnPart.png]]&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
[[File:Quest.png]]&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
[[File:TA.png]]&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user. It also demands scripting some server side code to handle the requests. We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99190</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=99190"/>
		<updated>2015-11-09T22:39:48Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Assumptions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user. It also demands scripting some server side code to handle the requests. We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98754</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98754"/>
		<updated>2015-11-07T15:04:48Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Running the tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
'''Note''' : As our project involves implementation of feature tests for assignment creation rather than refactoring, we do not test the new code via UI (as the new code added are themselves tests).&lt;br /&gt;
&lt;br /&gt;
'''Note''' : Travis CI build fails because we are directly using the development database for our tests, thus Travis CI is not able to locate the login information. This was done because it was not possible to create factories or fixtures for our tests. So, please don’t consider the build failure in the pull request to be a valid error.&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
===Other errors===&lt;br /&gt;
For any other kind of errors faced during setting up the repository, you can write to us at any of the following ids.&lt;br /&gt;
&lt;br /&gt;
* aslingwa@ncsu.edu&lt;br /&gt;
* gmeneze@ncsu.edu&lt;br /&gt;
* vpaul@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Scenarios Tested==&lt;br /&gt;
No matter which combination of parameters are selected in the creation of the assignment, the test cases should pass. Following are some of the scenarios which we have tested.&lt;br /&gt;
&lt;br /&gt;
===Scenarios for private assignment=== &lt;br /&gt;
*Create Assignment with Has teams parameter&lt;br /&gt;
*Create Assignment with Has quiz parameter&lt;br /&gt;
*Create Assignment with Wiki assignment parameter&lt;br /&gt;
*Create Assignment with Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with Is code submission required parameter&lt;br /&gt;
*Create Assignment with Available to students parameter&lt;br /&gt;
*Create Assignment with all options&lt;br /&gt;
*Create Assignment with no options&lt;br /&gt;
*Create Assignment with Has teams and Has quiz parameters&lt;br /&gt;
*Create Assignment with Micro-task assignment and Reviews visible to all other reviewers parameters&lt;br /&gt;
*Create Assignment with Is code submission required and Available to students parameters&lt;br /&gt;
*Create Assignment with Has team, Has quiz and Wiki assignment parameters&lt;br /&gt;
*Create Assignment with negative scenario&lt;br /&gt;
&lt;br /&gt;
===Scenarios for public assignment===&lt;br /&gt;
*Create Assignment with has teams parameter&lt;br /&gt;
*Create Assignment with has quiz parameter&lt;br /&gt;
*Create Assignment with has Wiki Assignment parameter&lt;br /&gt;
*Create Assignment with has Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with has Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with has Is code submission required parameter&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98668</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98668"/>
		<updated>2015-11-07T02:31:44Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Scenarios Tested */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
'''Note''' : As our project involves implementation of feature tests for assignment creation rather than refactoring, we do not test the new code via UI (as the new code added are themselves tests).&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
===Other errors===&lt;br /&gt;
For any other kind of errors faced during setting up the repository, you can write to us at any of the following ids.&lt;br /&gt;
&lt;br /&gt;
* aslingwa@ncsu.edu&lt;br /&gt;
* gmeneze@ncsu.edu&lt;br /&gt;
* vpaul@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Scenarios Tested==&lt;br /&gt;
No matter which combination of parameters are selected in the creation of the assignment, the test cases should pass. Following are some of the scenarios which we have tested.&lt;br /&gt;
&lt;br /&gt;
===Scenarios for private assignment=== &lt;br /&gt;
*Create Assignment with Has teams parameter&lt;br /&gt;
*Create Assignment with Has quiz parameter&lt;br /&gt;
*Create Assignment with Wiki assignment parameter&lt;br /&gt;
*Create Assignment with Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with Is code submission required parameter&lt;br /&gt;
*Create Assignment with Available to students parameter&lt;br /&gt;
*Create Assignment with all options&lt;br /&gt;
*Create Assignment with no options&lt;br /&gt;
*Create Assignment with Has teams and Has quiz parameters&lt;br /&gt;
*Create Assignment with Micro-task assignment and Reviews visible to all other reviewers parameters&lt;br /&gt;
*Create Assignment with Is code submission required and Available to students parameters&lt;br /&gt;
*Create Assignment with Has team, Has quiz and Wiki assignment parameters&lt;br /&gt;
*Create Assignment with negative scenario&lt;br /&gt;
&lt;br /&gt;
===Scenarios for public assignment===&lt;br /&gt;
*Create Assignment with has teams parameter&lt;br /&gt;
*Create Assignment with has quiz parameter&lt;br /&gt;
*Create Assignment with has Wiki Assignment parameter&lt;br /&gt;
*Create Assignment with has Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with has Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with has Is code submission required parameter&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98667</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98667"/>
		<updated>2015-11-07T02:27:47Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
'''Note''' : As our project involves implementation of feature tests for assignment creation rather than refactoring, we do not test the new code via UI (as the new code added are themselves tests).&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
===Other errors===&lt;br /&gt;
For any other kind of errors faced during setting up the repository, you can write to us at any of the following ids.&lt;br /&gt;
&lt;br /&gt;
* aslingwa@ncsu.edu&lt;br /&gt;
* gmeneze@ncsu.edu&lt;br /&gt;
* vpaul@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Scenarios Tested==&lt;br /&gt;
===Scenarios for private assignment=== &lt;br /&gt;
*Create Assignment with Has teams parameter&lt;br /&gt;
*Create Assignment with Has quiz parameter&lt;br /&gt;
*Create Assignment with Wiki assignment parameter&lt;br /&gt;
*Create Assignment with Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with Is code submission required parameter&lt;br /&gt;
*Create Assignment with Available to students parameter&lt;br /&gt;
*Create Assignment with all options&lt;br /&gt;
*Create Assignment with no options&lt;br /&gt;
*Create Assignment with Has teams and Has quiz parameters&lt;br /&gt;
*Create Assignment with Micro-task assignment and Reviews visible to all other reviewers parameters&lt;br /&gt;
*Create Assignment with Is code submission required and Available to students parameters&lt;br /&gt;
*Create Assignment with Has team, Has quiz and Wiki assignment parameters&lt;br /&gt;
*Create Assignment with negative scenario&lt;br /&gt;
&lt;br /&gt;
===Scenarios for public assignment===&lt;br /&gt;
*Create Assignment with has teams parameter&lt;br /&gt;
*Create Assignment with has quiz parameter&lt;br /&gt;
*Create Assignment with has Wiki Assignment parameter&lt;br /&gt;
*Create Assignment with has Micro-task assignment parameter&lt;br /&gt;
*Create Assignment with has Reviews visible to all other reviewers parameter&lt;br /&gt;
*Create Assignment with has Is code submission required parameter&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98656</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=98656"/>
		<updated>2015-11-07T02:07:36Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Running the tests */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
'''Note''' : As our project involves implementation of feature tests for assignment creation rather than refactoring, we do not test the new code via UI (as the new code added are themselves tests).&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
===Other errors===&lt;br /&gt;
For any other kind of errors faced during setting up the repository, you can write to us at any of the following ids.&lt;br /&gt;
&lt;br /&gt;
* aslingwa@ncsu.edu&lt;br /&gt;
* gmeneze@ncsu.edu&lt;br /&gt;
* vpaul@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98440</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98440"/>
		<updated>2015-11-06T20:26:59Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;br /&gt;
&lt;br /&gt;
==Assumptions==&lt;br /&gt;
This project only modifies the way that views rendered to the user.  We do not implement anything beyond this.&lt;br /&gt;
&lt;br /&gt;
==Portability==&lt;br /&gt;
The system is portable on windows and UNIX environment. After our modification, it can continue running on both Windows and UNIX environment.&lt;br /&gt;
&lt;br /&gt;
==Details of Requirements==&lt;br /&gt;
===Hardware requirements===&lt;br /&gt;
* Computing Power: The amount of computing power would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Memory: The amount of memory would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Disk Storage: The amount of disk storage would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Peripherals: The peripherals would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Network: The network would be the same as the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
===Software requirements===&lt;br /&gt;
* Operating system environment : The operating system can be either windows or UNIX based OS.  Both are now used in the current Expertiza system.&lt;br /&gt;
&lt;br /&gt;
* Networking environment: As used in the current Expertiza system&lt;br /&gt;
&lt;br /&gt;
* Tools: Ruby Mines, Git&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98439</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98439"/>
		<updated>2015-11-06T20:14:22Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Overall Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;br /&gt;
&lt;br /&gt;
===Scope and Documentation===&lt;br /&gt;
Upon careful investigation, we find that the following views need to be modified&lt;br /&gt;
&lt;br /&gt;
# participant/list.html.erb&lt;br /&gt;
# course/view_teaching_assistants.html.erb&lt;br /&gt;
# questionnaires/edit.html.erb&lt;br /&gt;
&lt;br /&gt;
The documents that will be generated for this project are the design document, the actual files that we edit or create, and a ReadMe that explains what we did and how to use the modified product.&lt;br /&gt;
&lt;br /&gt;
==Interface and Testing==&lt;br /&gt;
Our project will modify the existing views. After modification, the views’ look and feel should remain same as before. The rendering should be faster with lesser data sent to and from the server.&lt;br /&gt;
&lt;br /&gt;
===To test add participants:===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Create a new assignment and save it.&lt;br /&gt;
# Go to Manage -&amp;gt; Assignments, you should see your newly added assignment here.&lt;br /&gt;
# Now click on ’Add participants’ button available in the list of actions for the assignment, which will direct you to the page which lists all the participants of an assignment. Here you will have the option to add a new participant.&lt;br /&gt;
&lt;br /&gt;
===To test editing questionnaire===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Questionnaires. Create a new Review Questionnaire by clicking on the ‘New public item’ button for ‘Review’.&lt;br /&gt;
# Name the Questionnaire and click on create button&lt;br /&gt;
# Click on Edit for newly created questionnaire.&lt;br /&gt;
&lt;br /&gt;
===To test adding TA===&lt;br /&gt;
# Login in as instructor.&lt;br /&gt;
# Go to Manage -&amp;gt; Courses, you should see the list of courses already present in the Expertiza.&lt;br /&gt;
# Now click on ’Add TA’ button available in the list of actions for the course, which will direct you to the page which lists all the TAs of a course. Through this page, we can add new TAs as well.&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98437</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98437"/>
		<updated>2015-11-06T20:06:15Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
# Edit questionnaire&lt;br /&gt;
# Add TA to an existing course&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98436</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98436"/>
		<updated>2015-11-06T20:05:57Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Purpose */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
# Add Participants to an assignment&lt;br /&gt;
## Edit questionnaire&lt;br /&gt;
### Add TA to an existing course&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98435</id>
		<title>CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015_E1585_Use_Ajax_for_Add_Participants,_Add_TA_,Edit_Questionnaires_Screens&amp;diff=98435"/>
		<updated>2015-11-06T20:05:32Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: Created page with &amp;quot;==Overall Design== ===Purpose=== On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire pag...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Overall Design==&lt;br /&gt;
===Purpose===&lt;br /&gt;
On some of the views, whenever a user adds or modifies an existing record, the system is saving the entire page and then reloading the entire page back. This is an inefficient way of saving, especially if only one attribute has been modified. Our goal is to modify the views and use AJAX, so that only the newly added information is saved and not the entire page.&lt;br /&gt;
&lt;br /&gt;
We will be altering the views for the following scenarios&lt;br /&gt;
&lt;br /&gt;
* Add Participants to an assignment&lt;br /&gt;
** Edit questionnaire&lt;br /&gt;
*** Add TA to an existing course&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=98430</id>
		<title>CSC/ECE 517 Fall 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=98430"/>
		<updated>2015-11-06T19:57:18Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Final Project Design Document */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/sample_page]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1558BGJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1502/AAAASS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1503/IntegrateXMLParser]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1568BZHXJS]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1572VGA]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/oss_E1573_sap]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1559 rrz]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1570 avr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1556 CHM]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1504 JJD]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1562 APS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1501 GSN]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1501 GSN]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1550 KMM]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1551 RGS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1555 GMR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1552 NFR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1565 AAJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1561 WZL]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1553 AAJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1554 AAR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1569 JNR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1560 PSV]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1505 MSV]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1557 GXM]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1566 ARB]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1567 APT]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1574 BKS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/ossA1550RAN]]&lt;br /&gt;
&lt;br /&gt;
==Final Project Design Document==&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1577 MayYellowRoverJump]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1586 AnonymousChatBetweenAuthorAndReviewer]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1582 Create integration tests for the instructor interface using capybara and rspec]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1576 Refactoring submitted content (hyperlinks and files)]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1590 Integration testing for Team creation]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015 E1585 Use Ajax for Add Participants, Add TA ,Edit Questionnaires Screens]]&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97939</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97939"/>
		<updated>2015-11-01T00:58:09Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Solutions to problems while setting up the repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
===Other errors===&lt;br /&gt;
For any other kind of errors faced during setting up the repository, you can write to us at any of the following ids.&lt;br /&gt;
&lt;br /&gt;
* aslingwa@ncsu.edu&lt;br /&gt;
* gmeneze@ncsu.edu&lt;br /&gt;
* vpaul@ncsu.edu&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97935</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97935"/>
		<updated>2015-11-01T00:54:52Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Solutions to problems while setting up the repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
===Database related errors===&lt;br /&gt;
* Here is the link of Expertiza scrubbed DB (https://drive.google.com/a/ncsu.edu/file/d/0B2vDvVjH76uESEkzSWpJRnhGbmc/view?usp=sharing)&lt;br /&gt;
* Download the file, unzip it and dump to MySQL.&lt;br /&gt;
* Then type&lt;br /&gt;
    &lt;br /&gt;
    rake db:migrate RAILS_ENV=development&lt;br /&gt;
    rake db:migrate RAILS_ENV=test&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97868</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97868"/>
		<updated>2015-11-01T00:01:25Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Solutions to problems while setting up the repository */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb gem error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
* Run bundle install again.&lt;br /&gt;
&lt;br /&gt;
===pg gem error===&lt;br /&gt;
* To solve this, we have to install PostgreSQL.&lt;br /&gt;
* Then type in the following set of commands in the terminal&lt;br /&gt;
&lt;br /&gt;
      sudo sh -c &amp;quot;echo 'deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main' &amp;gt; /etc/apt/sources.list.d/pgdg.list&amp;quot;&lt;br /&gt;
      wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add -&lt;br /&gt;
      sudo apt-get update&lt;br /&gt;
      sudo apt-get install postgresql-common&lt;br /&gt;
      sudo apt-get install postgresql-9.3 libpq-dev&lt;br /&gt;
&lt;br /&gt;
*Run bundle install again&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97853</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97853"/>
		<updated>2015-10-31T23:38:39Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* rjb error */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [https://help.ubuntu.com/community/Java here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97852</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97852"/>
		<updated>2015-10-31T23:36:50Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Solutions to problems while setting up the repository==&lt;br /&gt;
===rjb error===&lt;br /&gt;
* To solve this, make sure that you have java installed on your system or else you could do that from [http://apt.ubuntu.com/p/openjdk-7-jdk here].&lt;br /&gt;
* Then set the JAVA_HOME environment variable by typing this on the terminal&lt;br /&gt;
      &lt;br /&gt;
     export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97725</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97725"/>
		<updated>2015-10-31T21:50:09Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Reviewer Instructions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/gmeneze/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97721</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97721"/>
		<updated>2015-10-31T21:47:10Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [https://github.com/gmeneze/expertiza Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [https://www.youtube.com/watch?v=yC_heDL6GSw Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_flow.png&amp;diff=97351</id>
		<title>File:Test flow.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Test_flow.png&amp;diff=97351"/>
		<updated>2015-10-30T18:20:31Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: This represents the flow of our tests.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This represents the flow of our tests.&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97350</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97350"/>
		<updated>2015-10-30T18:19:19Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Flow of our test==&lt;br /&gt;
[[File:test flow.png]]&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97345</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97345"/>
		<updated>2015-10-30T17:49:25Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Classes Involved */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. One of the major reasons for selecting Capybara to write our tests was that it has an intuitive API which mimics the language an actual user would use and also we can run tests from fast headless mode to an actual browser with no changes to our tests.&lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97343</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97343"/>
		<updated>2015-10-30T17:16:33Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97342</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97342"/>
		<updated>2015-10-30T17:15:33Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* assignment_creation.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97335</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97335"/>
		<updated>2015-10-30T15:41:02Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
*Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
*Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
*If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
*Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
*Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
*Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97333</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97333"/>
		<updated>2015-10-30T15:39:53Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
===Set up databses===&lt;br /&gt;
#Go to the expertiza directory.&lt;br /&gt;
&lt;br /&gt;
   cd expertiza&lt;br /&gt;
&lt;br /&gt;
#Create the development and test databases.&lt;br /&gt;
&lt;br /&gt;
   rake db:create:all&lt;br /&gt;
&lt;br /&gt;
#If available, import the database dump that you received in class to pre-populate your database. eg:&lt;br /&gt;
   &lt;br /&gt;
   mysql -u root expertiza_development &amp;lt; expertiza-scrubbed.sql&lt;br /&gt;
&lt;br /&gt;
#Run the Expertiza database migrations. This should populate your database with the current tables of the schema.&lt;br /&gt;
   &lt;br /&gt;
   rake db:migrate&lt;br /&gt;
&lt;br /&gt;
===Running the tests===&lt;br /&gt;
#Go to the expertiza directory if you are not already there.&lt;br /&gt;
&lt;br /&gt;
#Run the test&lt;br /&gt;
&lt;br /&gt;
    rspec spec/features/assignment_creation_spec.rb&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97331</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97331"/>
		<updated>2015-10-30T15:27:41Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Reviewer Instructions==&lt;br /&gt;
===Clone the reopsitory===&lt;br /&gt;
Visit [https://github.com/expertiza/expertiza Github repo] for the repository URL. Make sure you're logged in if you have commit access, because the URL will be different.&lt;br /&gt;
      &lt;br /&gt;
      git clone (repository URL)&lt;br /&gt;
&lt;br /&gt;
See https://help.github.com for help on setting up git, authenticating with SSH keys, and checking out a repository.&lt;br /&gt;
&lt;br /&gt;
===Installing Gems (ruby dependencies)===&lt;br /&gt;
In the expertiza directory:&lt;br /&gt;
&lt;br /&gt;
     bundle install&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97330</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VGA</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VGA&amp;diff=97330"/>
		<updated>2015-10-30T15:16:50Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: Created page with &amp;quot;{{student sandbox}} ==Introduction== This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rail...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97329</id>
		<title>CSC/ECE 517 Fall 2015</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015&amp;diff=97329"/>
		<updated>2015-10-30T15:15:45Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Writing Assignment 2==&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/sample_page]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1558BGJ]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1502/AAAASS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss/M1503/IntegrateXMLParser]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1568BZHXJS]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/ossE1572VGA]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2015/oss_E1573_sap]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1559 rrz]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1570 avr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1556 CHM]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1504 JJD]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1562 APS]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1501 GSN]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss M1501 GSN]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1555 GMR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1552 NRR]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2015/oss E1565 AAJ]]&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97327</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97327"/>
		<updated>2015-10-30T15:13:31Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* spec_helper.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all&lt;br /&gt;
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.&lt;br /&gt;
  # The generated `.rspec` file contains `--require spec_helper` which will cause&lt;br /&gt;
  # this file to always be loaded, without a need to explicitly require it in any&lt;br /&gt;
  # files.&lt;br /&gt;
  #&lt;br /&gt;
  # Given that it is always loaded, you are encouraged to keep this file as&lt;br /&gt;
  # light-weight as possible. Requiring heavyweight dependencies from this file&lt;br /&gt;
  # will add to the boot time of your test suite on EVERY test run, even for an&lt;br /&gt;
  # individual file that may not need all of that loaded. Instead, consider making&lt;br /&gt;
  # a separate helper file that requires the additional dependencies and performs&lt;br /&gt;
  # the additional setup, and require it from the spec files that actually need&lt;br /&gt;
  # it.&lt;br /&gt;
  #&lt;br /&gt;
  # The `.rspec` file also contains a few flags that are not defaults but that&lt;br /&gt;
  # users commonly want.&lt;br /&gt;
  #&lt;br /&gt;
  # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration&lt;br /&gt;
  RSpec.configure do |config|&lt;br /&gt;
    # rspec-expectations config goes here. You can use an alternate&lt;br /&gt;
    # assertion/expectation library such as wrong or the stdlib/minitest&lt;br /&gt;
    # assertions if you prefer.&lt;br /&gt;
  #&lt;br /&gt;
  config.expect_with :rspec do |expectations|&lt;br /&gt;
    # This option will default to `true` in RSpec 4. It makes the `description`&lt;br /&gt;
    # and `failure_message` of custom matchers include text for helper methods&lt;br /&gt;
    # defined using `chain`, e.g.:&lt;br /&gt;
    #     be_bigger_than(2).and_smaller_than(4).description&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2 and smaller than 4&amp;quot;&lt;br /&gt;
    # ...rather than:&lt;br /&gt;
    #     # =&amp;gt; &amp;quot;be bigger than 2&amp;quot;&lt;br /&gt;
    expectations.include_chain_clauses_in_custom_matcher_descriptions = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # rspec-mocks config goes here. You can use an alternate test double&lt;br /&gt;
  # library (such as bogus or mocha) by changing the `mock_with` option here.&lt;br /&gt;
  config.mock_with :rspec do |mocks|&lt;br /&gt;
    # Prevents you from mocking or stubbing a method that does not exist on&lt;br /&gt;
    # a real object. This is generally recommended, and will default to&lt;br /&gt;
    # `true` in RSpec 4.&lt;br /&gt;
    mocks.verify_partial_doubles = true&lt;br /&gt;
  end&lt;br /&gt;
  #&lt;br /&gt;
  # The settings below are suggested to provide a good initial experience&lt;br /&gt;
  # with RSpec, but feel free to customize to your heart's content.&lt;br /&gt;
  =begin&lt;br /&gt;
    # These two settings work together to allow you to limit a spec run&lt;br /&gt;
    # to individual examples or groups you care about by tagging them with&lt;br /&gt;
    # `:focus` metadata. When nothing is tagged with `:focus`, all examples&lt;br /&gt;
    # get run.&lt;br /&gt;
    config.filter_run :focus&lt;br /&gt;
    config.run_all_when_everything_filtered = true&lt;br /&gt;
    # Allows RSpec to persist some state between runs in order to support&lt;br /&gt;
    # the `--only-failures` and `--next-failure` CLI options. We recommend&lt;br /&gt;
    # you configure your source control system to ignore this file.&lt;br /&gt;
    config.example_status_persistence_file_path = &amp;quot;spec/examples.txt&amp;quot;&lt;br /&gt;
    # Limits the available syntax to the non-monkey patched syntax that is&lt;br /&gt;
    # recommended. For more details, see:&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax&lt;br /&gt;
    #   - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/&lt;br /&gt;
    #   - http://myronmars.to/n/dev-blog/2014/05/notable-changes-in-rspec-3#new__config_option_to_disable_rspeccore_monkey_patching&lt;br /&gt;
    config.disable_monkey_patching!&lt;br /&gt;
    # Many RSpec users commonly either run the entire suite or an individual&lt;br /&gt;
    # file, and it's useful to allow more verbose output when running an&lt;br /&gt;
    # individual spec file.&lt;br /&gt;
    if config.files_to_run.one?&lt;br /&gt;
      # Use the documentation formatter for detailed output,&lt;br /&gt;
      # unless a formatter has already been configured&lt;br /&gt;
      # (e.g. via a command-line flag).&lt;br /&gt;
      config.default_formatter = 'doc'&lt;br /&gt;
    end&lt;br /&gt;
    # Print the 10 slowest examples and example groups at the&lt;br /&gt;
    # end of the spec run, to help surface which specs are running&lt;br /&gt;
    # particularly slow.&lt;br /&gt;
    config.profile_examples = 10&lt;br /&gt;
    # Run specs in random order to surface order dependencies. If you find an&lt;br /&gt;
    # order dependency and want to debug it, you can fix the order by providing&lt;br /&gt;
    # the seed, which is printed after each run.&lt;br /&gt;
    #     --seed 1234&lt;br /&gt;
    config.order = :random&lt;br /&gt;
    # Seed global randomization in this process using the `--seed` CLI option.&lt;br /&gt;
    # Setting this allows you to use `--seed` to deterministically reproduce&lt;br /&gt;
    # test failures related to randomization by passing the same `--seed` value&lt;br /&gt;
    # as the one that triggered the failure.&lt;br /&gt;
    Kernel.srand config.seed&lt;br /&gt;
  =end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97324</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97324"/>
		<updated>2015-10-30T15:07:07Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
   #&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
   #&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
   # If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
   ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
   RSpec.configure do |config|&lt;br /&gt;
   # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
   config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
   config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
   #&lt;br /&gt;
   # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
   # examples within a transaction, remove the following line or assign false&lt;br /&gt;
   # instead of true.&lt;br /&gt;
   #  config.use_transactional_fixtures = true&lt;br /&gt;
   #  config.before(:suite) do&lt;br /&gt;
   #    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
   #    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
   #  end&lt;br /&gt;
   #  config.before(:each) do&lt;br /&gt;
   #    DatabaseCleaner.start&lt;br /&gt;
   #  end&lt;br /&gt;
   #&lt;br /&gt;
   # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
   # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
   # `post` in specs under `spec/controllers`.&lt;br /&gt;
   #&lt;br /&gt;
   # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
   # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
   #&lt;br /&gt;
   #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
   #       # ...&lt;br /&gt;
   #     end&lt;br /&gt;
   #&lt;br /&gt;
   # The different available types are documented in the features, such as in&lt;br /&gt;
   # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
   config.infer_spec_type_from_file_location! &lt;br /&gt;
   end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97323</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97323"/>
		<updated>2015-10-30T15:04:36Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
   # This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
   ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
   require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
   # Prevent database truncation if the environment is production&lt;br /&gt;
   abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
   require 'spec_helper'&lt;br /&gt;
   require 'rspec/rails'&lt;br /&gt;
   # Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
&lt;br /&gt;
   # Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
   # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
   # run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
   # in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
   # run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
   # end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
   # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
   #&lt;br /&gt;
   # The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
   # of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
   # directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
   # require only the support files necessary. &lt;br /&gt;
   #&lt;br /&gt;
   # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
&lt;br /&gt;
   # Checks for pending migrations before tests are run.&lt;br /&gt;
# If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
&lt;br /&gt;
RSpec.configure do |config|&lt;br /&gt;
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
  config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
  config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
&lt;br /&gt;
  # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
  # examples within a transaction, remove the following line or assign false&lt;br /&gt;
  # instead of true.&lt;br /&gt;
#  config.use_transactional_fixtures = true&lt;br /&gt;
&lt;br /&gt;
#  config.before(:suite) do&lt;br /&gt;
#    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each) do&lt;br /&gt;
#    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
#    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each) do&lt;br /&gt;
#    DatabaseCleaner.start&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
  # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
  # `post` in specs under `spec/controllers`.&lt;br /&gt;
  #&lt;br /&gt;
  # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
  # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
  #&lt;br /&gt;
  #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
  #       # ...&lt;br /&gt;
  #     end&lt;br /&gt;
  #&lt;br /&gt;
  # The different available types are documented in the features, such as in&lt;br /&gt;
  # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
  config.infer_spec_type_from_file_location! &lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97322</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97322"/>
		<updated>2015-10-30T15:02:14Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;br /&gt;
&lt;br /&gt;
# This file is copied to spec/ when you run 'rails generate rspec:install'&lt;br /&gt;
ENV['RAILS_ENV'] ||= 'test'&lt;br /&gt;
require File.expand_path('../../config/environment', __FILE__)&lt;br /&gt;
# Prevent database truncation if the environment is production&lt;br /&gt;
abort(&amp;quot;The Rails environment is running in production mode!&amp;quot;) if Rails.env.production?&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
require 'rspec/rails'&lt;br /&gt;
# Add additional requires below this line. Rails is not loaded until this point!&lt;br /&gt;
&lt;br /&gt;
# Requires supporting ruby files with custom matchers and macros, etc, in&lt;br /&gt;
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are&lt;br /&gt;
# run as spec files by default. This means that files in spec/support that end&lt;br /&gt;
# in _spec.rb will both be required and run as specs, causing the specs to be&lt;br /&gt;
# run twice. It is recommended that you do not name files matching this glob to&lt;br /&gt;
# end with _spec.rb. You can configure this pattern with the --pattern&lt;br /&gt;
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.&lt;br /&gt;
#&lt;br /&gt;
# The following line is provided for convenience purposes. It has the downside&lt;br /&gt;
# of increasing the boot-up time by auto-requiring all files in the support&lt;br /&gt;
# directory. Alternatively, in the individual `*_spec.rb` files, manually&lt;br /&gt;
# require only the support files necessary.&lt;br /&gt;
#&lt;br /&gt;
# Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }&lt;br /&gt;
&lt;br /&gt;
# Checks for pending migrations before tests are run.&lt;br /&gt;
# If you are not using ActiveRecord, you can remove this line.&lt;br /&gt;
ActiveRecord::Migration.maintain_test_schema!&lt;br /&gt;
&lt;br /&gt;
RSpec.configure do |config|&lt;br /&gt;
  # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures&lt;br /&gt;
  config.fixture_path = &amp;quot;#{::Rails.root}/spec/fixtures&amp;quot;&lt;br /&gt;
  config.include FactoryGirl::Syntax::Methods&lt;br /&gt;
&lt;br /&gt;
  # If you're not using ActiveRecord, or you'd prefer not to run each of your&lt;br /&gt;
  # examples within a transaction, remove the following line or assign false&lt;br /&gt;
  # instead of true.&lt;br /&gt;
#  config.use_transactional_fixtures = true&lt;br /&gt;
&lt;br /&gt;
#  config.before(:suite) do&lt;br /&gt;
#    DatabaseCleaner.clean_with(:truncation,:only =&amp;gt; ['users'])&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each) do&lt;br /&gt;
#    DatabaseCleaner.strategy = :transaction&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each, :js =&amp;gt; true) do&lt;br /&gt;
#    DatabaseCleaner.strategy = :truncation&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
#  config.before(:each) do&lt;br /&gt;
#    DatabaseCleaner.start&lt;br /&gt;
#  end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
  # RSpec Rails can automatically mix in different behaviours to your tests&lt;br /&gt;
  # based on their file location, for example enabling you to call `get` and&lt;br /&gt;
  # `post` in specs under `spec/controllers`.&lt;br /&gt;
  #&lt;br /&gt;
  # You can disable this behaviour by removing the line below, and instead&lt;br /&gt;
  # explicitly tag your specs with their type, e.g.:&lt;br /&gt;
  #&lt;br /&gt;
  #     RSpec.describe UsersController, :type =&amp;gt; :controller do&lt;br /&gt;
  #       # ...&lt;br /&gt;
  #     end&lt;br /&gt;
  #&lt;br /&gt;
  # The different available types are documented in the features, such as in&lt;br /&gt;
  # https://relishapp.com/rspec/rspec-rails/docs&lt;br /&gt;
  config.infer_spec_type_from_file_location! &lt;br /&gt;
end&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97321</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97321"/>
		<updated>2015-10-30T15:00:04Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97320</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97320"/>
		<updated>2015-10-30T14:59:30Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	&lt;br /&gt;
      scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
	      click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
      end&lt;br /&gt;
&lt;br /&gt;
     scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
     end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97319</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97319"/>
		<updated>2015-10-30T14:58:28Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
	      click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97318</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97318"/>
		<updated>2015-10-30T14:56:51Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases for the creation of a private assignment.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Reviews visible to all other reviewers?&amp;quot;,  :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_reviews_visible_to_all')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with negative scenario&amp;quot;, :skip_before, :js =&amp;gt; true  do&lt;br /&gt;
            visit root_path&lt;br /&gt;
            fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
            fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
            click_on('SIGN IN')&lt;br /&gt;
            expect(page).to have_content('Manage')&lt;br /&gt;
            within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
            click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
            click_button 'New private assignment'&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;New Assignment&amp;quot;)&lt;br /&gt;
            end &lt;br /&gt;
       end &lt;br /&gt;
&lt;br /&gt;
The test cases written also contain tests for the creation of public assignments. Listed below are the following tests. Once again we need to sign in the instructor before he can create any assignments.&lt;br /&gt;
&lt;br /&gt;
   RSpec.feature &amp;quot;create public assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do&lt;br /&gt;
      #@user = FactoryGirl.create(:user)&lt;br /&gt;
      visit root_path&lt;br /&gt;
      fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
      fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
      click_on('SIGN IN')&lt;br /&gt;
      expect(page).to have_content('Manage')&lt;br /&gt;
      within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
        click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
	scenario &amp;quot;Create Assignment has teams&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
	      click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('team_assignment')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
  scenario &amp;quot;Create Assignment has quiz&amp;quot;,:js =&amp;gt; true  do        &lt;br /&gt;
        click_button 'New public assignment'&lt;br /&gt;
        fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
        select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
        fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
        fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
        check('assignment_form_assignment_require_quiz')&lt;br /&gt;
        check('assignment_form_assignment_availability_flag')&lt;br /&gt;
        #find(:xpath, &amp;quot;//input[@id='']&amp;quot;).set &amp;quot;0&amp;quot;&lt;br /&gt;
        click_on('Create')&lt;br /&gt;
        click_on('Rubrics')&lt;br /&gt;
        within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
          select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
          select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
        end&lt;br /&gt;
        expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
        click_on('submit_btn')&lt;br /&gt;
        expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
  end&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97317</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97317"/>
		<updated>2015-10-30T14:50:32Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97316</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97316"/>
		<updated>2015-10-30T14:47:32Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
Given above is a portion of the code which we have to execute before testing each scenario. This is encapsulated within before(:each). In order to be able to create assignments, the instructor has to first login. So we set up the environment of logging in in the before(:each) block and navigating to the page where assignments can be created.&lt;br /&gt;
&lt;br /&gt;
We have written a total of 27 test cases in the assignment_creation.rb testing all the permutations and combinations with which an instructor can create an assignment. Listed below are a few of those test cases.&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has teams?&amp;quot;, :js =&amp;gt; true  do        &lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('team_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Has quiz?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_form_assignment_require_quiz')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end &lt;br /&gt;
&lt;br /&gt;
        scenario &amp;quot;Create Assignment with Wiki assignment?&amp;quot;, :js =&amp;gt; true  do&lt;br /&gt;
            uncheck('assignment_form_assignment_availability_flag')&lt;br /&gt;
            check('assignment_wiki_assignment')&lt;br /&gt;
            click_on('Create')&lt;br /&gt;
            click_on('Rubrics')&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
             select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]').first()&lt;br /&gt;
            end&lt;br /&gt;
&lt;br /&gt;
            within('#questionnaire_table_ReviewQuestionnaire') do&lt;br /&gt;
              select('Animation', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            within('#questionnaire_table_AuthorFeedbackQuestionnaire') do&lt;br /&gt;
              select('Author feedback OTD1', from: 'assignment_form[assignment_questionnaire][][questionnaire_id]')&lt;br /&gt;
            end&lt;br /&gt;
            expect(page).to have_content(&amp;quot;Rubrics&amp;quot;)&lt;br /&gt;
            click_on('submit_btn')&lt;br /&gt;
            expect(page).to have_content(&amp;quot;successfully&amp;quot;,:wait=&amp;gt;5)&lt;br /&gt;
        end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97315</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97315"/>
		<updated>2015-10-30T14:34:04Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
	      (rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97314</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97314"/>
		<updated>2015-10-30T14:33:24Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* Code */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
    require 'rails_helper'&lt;br /&gt;
    require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
    def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97232</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97232"/>
		<updated>2015-10-28T05:25:32Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* assignment_creation.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&amp;lt;syntaxhighlight lang='ruby'&amp;gt;&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97231</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97231"/>
		<updated>2015-10-28T05:23:56Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: /* assignment_creation.rb */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97230</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97230"/>
		<updated>2015-10-28T05:23:25Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97229</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97229"/>
		<updated>2015-10-28T05:21:03Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&amp;lt;source lang='ruby'&amp;gt;&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97228</id>
		<title>CSC/ECE 517 Fall 2015/ossE1572VPGMAL</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2015/ossE1572VPGMAL&amp;diff=97228"/>
		<updated>2015-10-28T05:14:59Z</updated>

		<summary type="html">&lt;p&gt;Vpaul: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{student sandbox}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a description of the Expertiza based OSS project. Expertiza is an open source rails application developed on ruby and rails. The application allows students to submit and peer-review learning objects (articles, code, web sites, etc). The instructors can create assignments using this application and customize and manage them. It also helps to introduce the peer review system by which students can review the projects of their colleagues.&lt;br /&gt;
&lt;br /&gt;
==Problem Statement==&lt;br /&gt;
We were expected to write a feature test which mocks the creation of an Assignment. For Expertiza Assignment management is the central part of the workflow. &lt;br /&gt;
Goals:&lt;br /&gt;
# Understand the flow of the Assignment creation by instructor manually.&lt;br /&gt;
# Mock the same steps using capybara&lt;br /&gt;
# Create multiple assignments with different options and testing their existence.&lt;br /&gt;
&lt;br /&gt;
==Project Links==&lt;br /&gt;
&lt;br /&gt;
* [http://www.wikipedia.org Github repo]&lt;br /&gt;
* [http://www.wikipedia.org Expertiza pull request]&lt;br /&gt;
* [http://www.wikipedia.org Youtube video manual]&lt;br /&gt;
&lt;br /&gt;
==Classes Involved==&lt;br /&gt;
* assignment_creation.rb&lt;br /&gt;
* spec_helper.rb&lt;br /&gt;
* rails_helper.rb&lt;br /&gt;
&lt;br /&gt;
The assignment_creation.rb contains the feature tests written to test the creation of the assignment. The rails_helper is copied to spec/ when you run 'rails generate rspec:install'. All the rspec-expectations config goes into the spec_helper_file. We have used Capybara and RSpec to test our application. Capybara helps you test web applications by simulating how a real user would interact with your app. &lt;br /&gt;
&lt;br /&gt;
==Code==&lt;br /&gt;
===assignment_creation.rb===&lt;br /&gt;
&lt;br /&gt;
require 'rails_helper'&lt;br /&gt;
require 'spec_helper'&lt;br /&gt;
&lt;br /&gt;
def GenerateAssignmentName()&lt;br /&gt;
	(rand(1000) + 1).to_s + 'RSpecID' + (1 + rand(1000)).to_s&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
RSpec.feature &amp;quot;create private assignment&amp;quot;  do&lt;br /&gt;
    before(:each) do |example|&lt;br /&gt;
      unless example.metadata[:skip_before]&lt;br /&gt;
         visit root_path&lt;br /&gt;
         fill_in('login_name', :with =&amp;gt; 'instructor6')&lt;br /&gt;
         fill_in('login_password', :with =&amp;gt; 'password')&lt;br /&gt;
         click_on('SIGN IN')&lt;br /&gt;
         expect(page).to have_content('Manage')&lt;br /&gt;
         within(&amp;quot;.content&amp;quot;) do&lt;br /&gt;
         click_on(&amp;quot;Assignments&amp;quot;)&lt;br /&gt;
         click_button 'New private assignment'&lt;br /&gt;
         fill_in('assignment_form_assignment_name',:with =&amp;gt; GenerateAssignmentName())&lt;br /&gt;
         select('CSC 517 Fall 2010', from: 'assignment_form_assignment_course_id')&lt;br /&gt;
         fill_in('assignment_form_assignment_directory_path',:with =&amp;gt; '/')&lt;br /&gt;
         fill_in('assignment_form_assignment_spec_location',:with =&amp;gt; 'google.com')&lt;br /&gt;
         end&lt;br /&gt;
      end &lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
===spec_helper.rb===&lt;br /&gt;
&lt;br /&gt;
===rails_helper.rb===&lt;/div&gt;</summary>
		<author><name>Vpaul</name></author>
	</entry>
</feed>