软件测试代写 |程序代写


COMP4004 Software Quality Assurance

Carleton university


A2: Individual Assignment COMP4004


A2 builds on top of A1 (using the same repository) and has 2 learning objectives:

1)Learning Cucumber in order to code and run specific acceptance tests I describe below.

2)Understanding the challenge of test data creation, that is, finding data that will make an acceptance test executable.


First, complete the functionality of the game, as specified in the use cases given for A1. There is no point in attempting A2 before getting your game to work correctly, at least for the specific acceptance tests I describe below. I want to emphasize that these tests DO NOT address any of the possible invalid actions of players (and corresponding warnings displayed by the game). These will be dealt with in A3. In other words, if you are short on time, you need not bother implementing the handling of these invalid actions.


Second, urgently learn Cucumber: listen to the posted tutorial from Matthew (and other online tutorials if necessary) and run a simple example in Cucumber. That is, be sure to be able to run in one shot a few scenarios for a simple example before proceeding with my small set of acceptance tests for your game.


Then study the following acceptance tests and determine which cards and actions to use to instantiate each one of them. In other words, for each of the acceptance tests I describe below, decide on the initial hand, drawn cards and actions of each player in order to transform each of my acceptance tests into an acceptance test case that can be made to run and pass.


Continue by implementing each of your test cases, that is, by coding the relevant step definitions. The THEN clauses of your test cases must have the appropriate assert statements (see below) in their corresponding step definitions. Finally, run your suite of executable scenarios in one shot in order to verify each of them passes.


Use a single feature file with all the appropriately named tests I describe below. Also use a single file for step-definitions.


Please note:

-In the following tests, I do omit details about drawing and discarding card, as well as trimming hands, as these can and must be inferred from the descriptions I provide

-As for A1, it is crucial your scenarios call actual procedures of the game. That is, your acceptance test cases must test the game (as opposed to specifying sequences of inputs, actions and outputs that bypass the game).

-Students using exactly the same rigged cards for the entire suite of Acceptance Tests may be deemed to have copied off each other.


Here are the acceptance tests to develop (Please use names in red for your commits):

1)A1_scenario (35%)

You must implement a scenario that follows the compulsory scenario of A1. In other words you must set up the hands and follow the description of that scenario (including the prompting order of participants for a quest). This scenario covers a lot of the functionality of the game and already has all its cards and actions specified. For the next three tests, YOU must come up with the cards and actions required to follow exactly the given description. You must assert who wins the quest.

2)2winner_game_2winner_quest: (30%)

P1 draws a 4-stage quest and decides to sponsor it. P1 builds 4 stages, the first of which only has a foe and no weapon.

P2, P3 and P4 participate in stage 1 and build their attack.

P2 and P4 have their attack win over this stage, whereas P3 loses.

P2 and P4 participate in and win stages 2, then 3 and then 4.

P2 and P4 each earn 4 shields.

P2 draws a 3 stage quest and declines to sponsor it. P3 sponsors this quest and builds its stages.

P1 declines to participate.

P2 and P4 participate in and win stages 1, 2 and 3.

P2 and P4 each earn 3 shields and both are declared (and asserted as) winners.

3)1winner_game_with_events: (25%)

P1 draws a 4 stage quest and decides to sponsor it. P1 builds 4 stages

P2, P3 and P4 participate in and win all stages.

P2, P3 and P4 each earn 4 shields

P2 draws ‘Plague’ and loses 2 shields

P3 draws ‘Prosperity’: All 4 players receive 2 adventure cards

P4 draws ‘Queen’s favor’ and thus draws 2 adventure cards

P1 draws a 3 stage quest and decides to sponsor it. P1 builds 3 stages

P2, P3 and P4 participate in stage 1. P2 and P3 win, whereas P4 loses.

P2 and P3 participate in and win stages 2 and 3

P2 and P3 earn 3 shields: P3 is declared (and asserted as) the winner

4)0_winner_quest: (10%)

P1 draws a 2 stage quest and decides to sponsor it. P1 builds 2 stages

P2, P3 and P4 participate in stage 1 and all lose stage 1!

The quest ends with no winner but P1 does discards and draws. (Here you need to figure out what to assert to confirm this outcome .)


The first and last tests correspond to partial games, whereas the second and the third one specify complete games.

The grid to submit and the requirements of the short video you will have to create will be posted closer to the deadline of this assignment.


咨询 Alpha 小助手,获取更多课业帮助