We need to test a long process of steps for one Feature. From logging in to many modal dialogs, multi-step forms, and users of different roles all interacting. How can we break parts of this process down into individual Scenarios?
Here is an example:
Scenario: New Manuscript
Given I am on the manuscripts page
When I press "Submit A New Manuscript"
Then I should see "Please specify this manuscript's type"
Scenario: Choose Manuscript Type
Given I am choosing a manuscript type
When I click "Original Paper"
Then I should see "Edit Manuscript Details"
Scenario: Edit Manuscript Details
Given I am editing manuscript details
And I am on the editing page
When I fill in "Manuscript Title" with "Testing Story"
Then I should see "Suggest Reviewers"
And so on and so on for dozens of scenarios. The problem is each scenario is built off of the last one. How can I test each scenario in isolation without repeating all of the previous ones?
Scenarios are supposed to be self contained, so you can either create a setup Background process, that setups a basic manuscript that you can use in different scenarios:
Feature: ...
Background:
Given a single manuscript exists
Scenario: ...
Scenario: ...
Scenario: ...
If you are really building on the previous step and are entirely dependent upon it, then create a single scenario:
Scenario: Manuscript flow
Given I am on the manuscripts page
When I press "Submit A New Manuscript"
Then I should see "Please specify this manuscript's type"
Given I am choosing a manuscript type
When I click "Original Paper"
Then I should see "Edit Manuscript Details"
Given I am editing manuscript details
And I am on the editing page
When I fill in "Manuscript Title" with "Testing Story"
Then I should see "Suggest Reviewers"
Related
Is there a way to have form "go to section" one after the other in case of conflict?
Let's say we have two questions with multiple-choice "go to section" set up, as you see above.
The thing is that Forms will base the logic only upon the last multiple-choice. This means that if I select anything in the 2nd question, it will ignore the answer to the first question.
While I do understand why this is programmed that way, I was wondering if there's a way to make them both work?
One idea was to send me to the sections one after the other. This would mean that "after section 1" should be dynamically updated from "submit" to "go to section 2". It cannot be always "go to section 2" as I don't always need to go to that section :)
One section after the other is just one idea. I'm sure there're other creative ways to solve this.
Any ideas?
Details
If both question1 and question2 are located in the same section, you cannot avoid conflicts by specifying different behavior after for responding those questions
If the answer to the first question triggers "Go to section 2" and the answer to the second question triggers "Go to section 3" - how is the form supposed to know which request has priority.
You need to restructure your logic
The easiest thing to do would be to split up question1 and question2 into separate sections
For example: section 1 shall contian only question1, after answering which the user is redirected. After filling out the section to which the user has been redirected - implement a redirection the a new section, where question 2 is implemented.
When a user creates a bug on the Agile template, we have fields such as 'System Info', 'Repro Steps' and 'Acceptance Criteria'. If the bug should have been a User Story (change), we can use the 'Create Copy of Work item' link, but only the title and priority fields are migrated to the new user story.
Is there a way to define a mapping for the 'Create Copy of Work item' workflow to migrate a specific bug field to a specific user story field, and vice-versa?
Sorry it's not able to achieve this. You may have to manually migrated some specific fields and values when create copy of work item'
Have raised a feature request here:
Customize a field mapping by using 'Create Copy of Work item' workflow
https://developercommunity.visualstudio.com/idea/1145139/customize-a-field-mapping-by-using-create-copy-of.html
Kindly vote up and monitor the process. Our Product team will review it.
All! I've been searching for an answer to this question for ages. Hoping somebody is able to help me out here.
Here is what I want to do:
Create a custom field. (Either a drop-down with a simple [yes/no] or checkbox).
Implement logic, based on the value of the custom field, which dictates the next column on the Kanban board the story must be put in.
Real World Example:
Here's an example:
I create a Drop-Down/Checkbox called: "Business Review Required".
I have three columns on my kanban board: "In Progress", "Business Review", "QA"
If the value of the "Business Review Required" custom field is 'yes' or 'enabled', then the Story MUST go into the "Business Review" column on my kanban board.
If the value of the "Business Review Required" custom field is 'no' or 'disabled', then the Story will be PREVENTED from going into the "Business Review" column, and must go to "QA".
I appreciate any assistance anybody can provide. Thank you very much!
Define transitions from the first status to each of the other three statuses
Add a condition to each transition to restrict when that transition is valid, e.g. "Business Review Required" custom field is 'yes'
Now only the appropriate transition button will appear.
The problem is that users don't know why the other choices are not shown
I have a feature I'm struggling to implement, didn't find a proper answer anywhere.
When a user puts some text in an input form and clicks a "next" button, he sees the input text as a heading of another page.
You can login to my app to see exactly what I mean: http://murmuring-headland-8091.herokuapp.com/
For example, a user writes down a decision he wants to make: "Which job to choose?", and after clicking "What are your options?" button, he sees "Which job to choose?" instead of "Step 2 of 4.".
I think what I want to implement is called "a string", but I can't go any further with that knowledge.
Hope I made my question clear. I'm a newbie, so I hope to get a detailed answer.
Here's the github of my app: https://github.com/strikhar/decisions
Thank you for taking your time and helping me!
The input field "Which job to choose?" has no name associated with it. So, you need to assign it a name for accessing the input given by user.
Once you assign it a name, say whichjob, you will be able to access its string through params[:whichjob]. Then using this, you can display this string in place of "Step 2 of 4."
Instead of using this means
What are your options? ->
use a submit field for the same. For example,
<form action='/options'>
.
.
.
.
<input type='submit' value='Submit it now and go to "What are your options?"' />
I have the following scenarios:
Scenario: Create a game with valid information
Given I am logged in
When I visit the new game page
And I fill in "Game type" with "Basketball"
And I fill in "Zip code" with "94040"
And I fill in "Description" with "Friendly match"
And I click on the button "Create Game"
Then I should see "Awesome! Your game has been created."
Scenario: Create a game with missing information
Given I am logged in
When I visit the new game page
And I fill in "Zip code" with "94040"
And I fill in "Description" with "Friendly match"
And I click on the button "Create Game"
Then I should see "Game type can't be blank."
As you can see I am repeating code and as a developer point of view, I hate that I am repeating some sentences in both scenarios. However, I assume that scenarios have to be independent clear, so any stakeholder can take a look and say..Oh, I know what this scenario is describing.
I am trying to test if my form validation is working correctly for different kind of field values. So, I will have many similar scenarios that will be basically changing the "fill in" parts. So, another similar/related scenario would be the one that checks that zip code has to be numeric:
Scenario: Create a game with invalid zip code
Given I am logged in
When I visit the new game page
And I fill in "Game type" with "Basketball"
And I fill in "Zip code" with "ffff"
And I fill in "Description" with "Friendly match"
And I click on the button "Create Game"
Then I should see "Zip code has to contain 5 digits."
So, my question is: Is there any DRY, business people friendly way of doing this? I mean, a balance between code optimization and clear and understandable independent scenario definition?
I think scenario outline would suit you well.