Skip to content

Instantly share code, notes, and snippets.

@knowuh
Created March 3, 2011 20:54
Show Gist options
  • Save knowuh/853535 to your computer and use it in GitHub Desktop.
Save knowuh/853535 to your computer and use it in GitHub Desktop.
Feature: Investigations can be reported on
So that researchers can report on activies run by students
As a researcher
I want to print several kinds of reports
So that our work can be validated
Which will support the funding of future projects
Background:
Given The default project and jnlp resources exist using factories
# for the sake of visual clarity, all correct answers are 'a'
And the following multiple choice questions exists:
| prompt | answers | correct_answer |
| a | a,b,c,d | a |
| b | a,b,c,d | a |
| c | a,b,c,d | a |
| d | a,b,c,d | a |
| e | a,b,c,d | a |
| f | a,b,c,d | a |
| b_a | a,b,c,d | b |
| b_b | a,b,c,d | b |
| b_c | a,b,c,d | b |
| b_d | a,b,c,d | b |
| b_e | a,b,c,d | b |
| b_f | a,b,c,d | b |
And The following investigation exists:
| investigation | activity | section | page | multiple_choices |
| first investigation | act 1 | section 1 | page 1 | a, b |
| first investigation | act 2 | section 1 | page 1 | c, d |
And The following investigation exists:
| investigation | activity | section | page | multiple_choices |
| second investigation | act 1 | section 1 | page 1 | b_a, b_b |
| second investigation | act 2 | section 1 | page 1 | b_c, b_d |
And the following teachers exist:
| login | password |
| teacher_a | teacher_a |
| teacher_b | teacher_a |
And the following classes exist:
| name | teacher |
| Intro to bugs | teacher_a |
| Intro to flowers | teacher_b |
# we expect student a = 100% correct, b = 50%, c = 0%
And the following students exist:
| login | password | class |
| student_a | student_a | Intro to bugs |
| student_b | student_b | Intro to bugs |
| student_c | student_c | Intro to bugs |
And the following assignments exist:
| investigation | class |
| first investigation | Intro to bugs |
| second investigation | Intro to bugs |
| second investigation | Intro to flowers |
Scenario: A student answers all questions, and gets them all correct
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | a |
| student_a | Intro to bugs | first investigation | b | a |
| student_a | Intro to bugs | first investigation | c | a |
| student_a | Intro to bugs | first investigation | d | a |
Then "student_a" should have 4 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 100% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 100% of the qeustions correctly for "first investigation" in "Intro to Bugs"
Scenario: A student answers half of the questions, and gets them both right
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | a |
| student_a | Intro to bugs | first investigation | b | a |
Then "student_a" should have 2 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 50% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 50% of the qeustions correctly for "first investigation" in "Intro to Bugs"
Scenario: A student answers 3/4 of the questions, and gets them all wrong
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | b |
| student_a | Intro to bugs | first investigation | b | b |
| student_a | Intro to bugs | first investigation | c | b |
Then "student_a" should have 3 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 75% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 0% of the qeustions correctly for "first investigation" in "Intro to Bugs"
Scenario: A student answers none of the questions, and gets them all wrong
Given the following student answers:
| student | class | investigation | question_prompt | answer |
Then "student_a" should have 0 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 0% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 0% of the qeustions correctly for "first investigation" in "Intro to Bugs"
Scenario: A student changes their answer from incorrect, to correct.
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | b |
| student_a | Intro to bugs | first investigation | a | a |
| student_a | Intro to bugs | first investigation | c | b |
Then "student_a" should have 3 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 75% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 25% of the qeustions correctly for "first investigation" in "Intro to Bugs"
Scenario: Confusions about an answered, seen, and unseen questions
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | b |
| student_a | Intro to bugs | first investigation | b | b |
| student_a | Intro to bugs | first investigation | c ||
Then "student_a" should have 2 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 50% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 0% of the qeustions correctly for "first investigation" in "Intro to Bugs"
@current
Scenario: Record the normal opration of reporting an investigation
Given the following student answers:
| student | class | investigation | question_prompt | answer |
| student_a | Intro to bugs | first investigation | a | a |
| student_a | Intro to bugs | first investigation | b | a |
| student_a | Intro to bugs | first investigation | c | a |
| student_a | Intro to bugs | first investigation | d | a |
| student_a | Intro to bugs | first investigation | e | a |
| student_b | Intro to bugs | first investigation | b | a |
| student_b | Intro to bugs | first investigation | c | b |
| student_b | Intro to bugs | first investigation | d | b |
| student_b | Intro to bugs | first investigation | e | b |
| student_a | Intro to bugs | second investigation | a | a |
| student_a | Intro to bugs | second investigation | b | a |
| student_a | Intro to bugs | second investigation | c | a |
| student_a | Intro to bugs | second investigation | d | a |
| student_a | Intro to bugs | second investigation | e | a |
| student_b | Intro to bugs | second investigation | a | b |
| student_b | Intro to bugs | second investigation | b | b |
| student_b | Intro to bugs | second investigation | c | b |
| student_b | Intro to bugs | second investigation | d | b |
| student_b | Intro to bugs | second investigation | e | b |
| student_a | Intro to flowers | second investigation | a | a |
| student_a | Intro to flowers | second investigation | b | a |
| student_a | Intro to flowers | second investigation | c | a |
| student_a | Intro to flowers | second investigation | d | a |
| student_a | Intro to flowers | second investigation | e | a |
| student_b | Intro to flowers | second investigation | a | b |
| student_b | Intro to flowers | second investigation | b | b |
| student_b | Intro to flowers | second investigation | c | |
Then "student_a" should have 5 answers for "first investigation" in "Intro to Bugs"
And "student_a" should have answered 100% of the questions for "first investigation" in "Intro to Bugs"
And "student_a" should have 100% of the qeustions correctly for "first investigation" in "Intro to Bugs"
And "student_b" should have 4 answers for "first investigation" in "Intro to Bugs"
And "student_b" should have answered 80% of the questions for "first investigation" in "Intro to Bugs"
And "student_b" should have 20% of the qeustions correctly for "first investigation" in "Intro to Bugs"
And "student_a" should have 5 answers for "second investigation" in "Intro to Bugs"
And "student_a" should have answered 100% of the questions for "second investigation" in "Intro to Bugs"
And "student_a" should have 100% of the qeustions correctly for "second investigation" in "Intro to Bugs"
And "student_b" should have 5 answers for "second investigation" in "Intro to Bugs"
And "student_b" should have answered 100% of the questions for "second investigation" in "Intro to Bugs"
And "student_b" should have 0% of the qeustions correctly for "second investigation" in "Intro to Bugs"
And "student_a" should have 4 answers for "second investigation" in "Intro to Bugs"
And "student_a" should have 100% of the qeustions correctly for "first investigation" in "Intro to Bugs"
#And a recording of a report for "first investigation"
#Then the report generated for "first investigation" should match recorded data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment