CSC/ECE 517 Spring 2014/oss E1405 irw: Difference between revisions

From Expertiza_Wiki
Jump to navigation Jump to search
(Created page with "'''Improve tests & investigate regex warnings for student_task ''' == Introduction == === Background === This model allows for much of the functionality the student requires to ...")
 
(→‎Objective 2: Add additional tests: Added note about better tests vs more tests)
 
(2 intermediate revisions by 2 users not shown)
Line 2: Line 2:


== Introduction ==
== Introduction ==
=== Background ===
=== Background ===
This model allows for much of the functionality the student requires to interact effectively with expertiza. Here a student is able to sign up for topics, form teams, submit assignments, review other students' work, and check his or her own scores.
This model allows for much of the functionality the student requires to interact effectively with expertiza. Here a student is able to sign up for topics, form teams, submit assignments, review other students' work, and check his or her own scores.


== Work accomplished ==
== Work accomplished ==
=== Objective 1: Fix existing tests ===
=== Objective 1: Fix existing tests ===
Initially, there were 26 tests with errors. Many tests required functionality or fixtures that were likely changed by people working on expertiza over the years.
Initially, there were 26 tests with errors. Many tests required functionality or fixtures that were likely changed by people working on expertiza over the years.
==== Issues ====
==== Issues ====
Many fixtures required to correct the tests were missing, and had to be added or created. Additionally, several tests were referencing deleted elements of fixture files which were added in order to correct test functionality. Finally, there were certain elements of the code itself in the controller file which had to be corrected in order for tests to run.
Many fixtures required to correct the tests were missing, and had to be added or created. Additionally, several tests were referencing deleted elements of fixture files which were added in order to correct test functionality. Finally, there were certain elements of the code itself in the controller file which had to be corrected in order for tests to run.
==== Result ====
All tests now pass without errors, failures or deprecation warnings:
.........................
Finished in 1.235192136 seconds.
25 tests, 26 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications


=== Objective 2: Add additional tests ===
=== Objective 2: Add additional tests ===


After digging into the code, it became clear that what's needed isn't more tests, but better tests. The existing tests were very obtuse and frequently broken. They are now much more maintainable.


== Future work ==
== Future work ==
There is no current unit test file for student_task.
There is no current unit test file for student_task, which means there aren't unit tests. Such tests should be added in the future in order to ensure proper functionality.
 
With regard to student_task_controller_test.rb, it really should be refactored more than expanded. It has reasonable test coverage, what it needs is easier to understand, more elegant tests.

Latest revision as of 03:14, 1 April 2014

Improve tests & investigate regex warnings for student_task

Introduction

Background

This model allows for much of the functionality the student requires to interact effectively with expertiza. Here a student is able to sign up for topics, form teams, submit assignments, review other students' work, and check his or her own scores.

Work accomplished

Objective 1: Fix existing tests

Initially, there were 26 tests with errors. Many tests required functionality or fixtures that were likely changed by people working on expertiza over the years.

Issues

Many fixtures required to correct the tests were missing, and had to be added or created. Additionally, several tests were referencing deleted elements of fixture files which were added in order to correct test functionality. Finally, there were certain elements of the code itself in the controller file which had to be corrected in order for tests to run.

Result

All tests now pass without errors, failures or deprecation warnings:

.........................

Finished in 1.235192136 seconds.

25 tests, 26 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications


Objective 2: Add additional tests

After digging into the code, it became clear that what's needed isn't more tests, but better tests. The existing tests were very obtuse and frequently broken. They are now much more maintainable.

Future work

There is no current unit test file for student_task, which means there aren't unit tests. Such tests should be added in the future in order to ensure proper functionality.

With regard to student_task_controller_test.rb, it really should be refactored more than expanded. It has reasonable test coverage, what it needs is easier to understand, more elegant tests.