Chapter 7: Requirements -> Behavior Driven Design

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Rewrite this feature to make it SMART. "Feature: I want to see a sorted list of movies sold."

"Feature: As a customer, I want to see the top 10 movies sold, listed by price, so that I can buy the cheapest ones first.

How does Pivotal use contracts?

"We will work with you in the most effective way possible up until Date D"

What are pivotal Tracker Pitfalls?

- Dividing up stories by layers instead of by breaking up the task - not tracking bugs - using tracker as a "todo" list

How does Capybara simulate the browser?

- can interact with app to receive pages - parse HTML - submit forms as a user would - run JavaScript that modifies the page

What three clauses have to be present in the Connextra format?

- kind of stakeholder - I can achieve some goal - do some task

What does Scheduling and Monitoring Progress entail?

- use a scheduling tool that shows which tasks can be performed in parallel and which have dependencies so they must be performed sequentially. - PERT chart: Identify the critical path, which determines the minimum time for project.

How do you handle bugs in pivotal tracker?

- velocity should include cost of bug fixing - cost of bug is 0 points - bugs do need lifecycle tracking just like features

As requirements change over time, these items above imply other task, such as

1. Change Management for Requirements, Cost, and Schedule 2. Ensuring Implementation Matches Requirement Features

What is the anatomy of a step definition?

1. Keyword (Given, When, etc) 2. First arg = Regexp to match step in scenario (matches exactly one step def) 3. Capture groups --> argument do blocks

Which methodologies are done up front for the Waterfall model and at the beginning of each major iteration for the Spiral and RUP models?

1. Requirements Elicitation 2.Requirements Documentation 3. Cost Estimation 4. Scheduling and Monitoring Progress

What is the story lifecycle?

1. created (everyone) 2. estimated (everyone) 3. prioritized (product owner) 4. assigned (Product owner/team) 5. started (Owner 1 or pair) 6. finished (including tests) 7. delivered 8. accepted (customers says when its accepted) 9. Estimate velocity (pivotal tracker)

What two properties should the point scale have?

1. everyone on the team should be in rough agreement on how much a "point" is worth. 2. more points should represent not only more effort, but more uncertainty Recommend: 1, 2, 4, 8 (exponential)

What is a domain language?

A domain language is informal but uses terms and concepts specific to your application, rather than generic terms and concepts related to the implementation of the user interface. Steps written in a domain language are typically more declarative than imperative in that they describe the state of the world rather than the sequence of steps to get to that state and they are less dependent on the details of the user interface.

What is step definitions?

A separate set of files defines the Ruby code that tests these steps Expect to find: - Calls to ActiveRecord to set up preconditions - Calls to Capybara

What is a spike?

A short investigation into a technique or problem that the team wants explored before sitting down to do serious coding. After a spike is done, the spike code must be thrown away: The spike's purpose is to help you determine what approach you want to follow, and now that you know, you should write it correctly.

What is use-case analysis?

A term traditionally used in software engineering to describe a similar process as user stories A full use case analysis would include the use case name; actor(s); goals of the action; summary of the use case; preconditions (state of the world before the action); steps occurring in the scenario (both the actions performed by the user and the system's responses); related use cases; and postconditions (state of the world after the action)

How do you make sure your story is Relevant?

A user story must have business value to one or more stakeholders.

what are acceptance and integration test?

Acceptance: ensure satisfied customer Integration: ensure interfaces between modules and consistence assumptions

How is Agile different than a plan-and-document lifecycle

Agile development does not switch phases (and people) over time from development mode to maintenance mode. With Agile, you are basically in maintenance mode as soon as you've implemented the first set of features. This approach helps make the project easier to maintain and evolve.

Which expression statement regarding P&D requirements and cost estimation is false? - Agile has no equivalent to ensuring requirements, such as traceability - The closest to the P&D schedule and monitoring tasks are agile points and velocity - The closest to the P&D software requirements specification (SRS) document is Agile User Stories - Actually, these statements are all true; none are false

Agile has no equivalent to ensuring requirements, such as traceability Explanation: Agile enforces and establishes requirements through customer meetings.

Which of the following, if any, are usually NOT part of designing and implementing a typical user story? - Tests (integration, acceptance, unit) - Back end code (Rails) - Front end code (HTML, views, JavaScript) - All of these answers are usually involved in designing and implementing a user story

All of these answers are usually involved in designing and implementing a user story Explanation: A story should not be marked as finished unless there are tests. Front end code and back end code are crucial to delivering the presentation and functionality of a user story, so all three are necessary to implementing a user story.

What is the minimum viable product? (MVP)

An expansion of R (relevant), MVP is a subset of the full set of features that when completed has business value in the real world. The combination of all of them makes the software product viable in the marketplace

How does a step definition fail?

Assertion failures: X "should" be the case, but isn't Exceptions: Actual ruby/rails error while executing

What is the experimental approach to cost estimation?

Assumes the project managers have significant experience either at the company or in the industry, and they rely on that experience to make accurate estimates. It certainly increases confidence when the project is similar to tasks that the organization has already successfully completed.

What is velocity?

At the end of the iteration, the team computes the total number of points completed, rather than the number of stories. The moving average of this total is called the team's velocity. Velocity measures work rate based on the team's self-evaluation. Velocity: avg. number of points /week

What is Behavior-Driven Design (BDD)?

BDD asks questions about the behavior of an application before and during development so that the stakeholders are less likely to miscommunicate Requirements are written down as in plan-and-document and continuously refined to ensure the resulting software meets the stakeholders' desires.

What does and doesn't pivotal commit to?

Because Pivotal does Agile, Pivotal never commits to delivering features X, Y, and Z by date D. Pivotal commits to providing a certain amount of resources to work in the most efficient way possible up to date D.

What is an advantage of using formal specification languages?

Both precision in the specification and the potential to automatically generate tests cases or even use formal methods for verification of correctness

How does Cucumber and Capybara automatically test the behavior of the SaaS app.

By storing features in files along with different scenarios of feature use composed of many steps, and storing Ruby code in separate files containing step definitionsthat tests each type of step

How does Cucumber tackle explicit and implicit requirements?

Create acceptance tests and integration tests—if you write user stories for both explicit and implicit requirements.

What does is mean when you say "Cucumber is supposed to be about behavior rather than implementation"

Cucumber focuses on what is being done

What is Cucumber?

Cucumber turns customer-understandable user stories into acceptance tests, which ensure the customer is satisfied, and integration tests, which ensure that the interfaces between modules have consistent assumptions and communicate correctly

How does Cucumber match the steps of the scenarios with the step definitions that perform these tests?

Cucumber uses regular expressions or regexes to match the English phrases in the steps of the scenarios to the step definitions of the testing harness. A way to think of the relationship between step definitions and steps is that step definitions are like method definitions, and the steps of the scenarios are like method calls

.feature is writing in what language?

Cucumber!

The Background keyword can be used to do what?

DRY out common steps across related scenarios in a single feature file.

What is the interplay between feature and scenario?

Each scenario is in turn composed of a sequence of typically 3 to 8 steps. Expanding a user story into a set of scenarios also helps developers enumerate the various user-visible conditions that will be tested to ensure the feature works.

What is the quantitative approach to cost estimation?

Estimate the programming effort of the tasks in a technical measure such as lines of code (LOC), and then divide by a productivity measure like LOC per person-month to yield person-months per task.

Which is TRUE about implicit vs. explicit and declarative vs. imperative scenarios? - Declarative scenarios aim to capture implementation as well as behavior - Explicit scenarios usually capture integration tests - All are false - Explicit requirements are usually defined with imperative scenarios and implicit requirements are usually defined with declarative scenarios

Explicit requirements are usually defined with imperative scenarios and implicit requirements are usually defined with declarative scenarios Explanation: Explicit scenarios usually capture acceptance tests that reflect user stories discussed with the customer. Declarative scenarios are more focused on behavior, not implementation. The remaining answer choice flips the definitions of explicit and implicit requirements (explicit requirements are defined with declarative scenarios, implicit with imperative scenarios.

True or False: As practitioners of Agile Development, Pivotal Labs does not use contracts.

False. Pivotal certainly offers customers a contract that they sign, but it is primarily a promise to pay Pivotal for its best effort to make the customer happy over a limited range of time.

True or False: Explicit requirements are usually defined with imperative scenarios and implicit requirements are usually defined with declarative scenarios.

False. These are two independent classifications; both requirements can use either type of scenarios.

True or False: When you don't know how to approach a given user story, just give it 3 points.

False: A user story should not be so complex that you don't have an approach to implementing it. If they are, you should go back to your stakeholders to refactor the user story into a set of simpler tasks that you do know how to approach.

True or False: When comparing two teams, the one with the higher velocity is more productive.

False: Since each team assigns points to user stories, you cannot use velocity to compare different teams. However, you could look over time for a given team to see if there were iterations that were significantly less or more productive.

What are function points?

Function points are an alternative measure to LOC that can lead to estimates that are more accurate. They are based on the function inputs, outputs, external queries, input files, output files, and the complexity of each. The corresponding productivity measure is then function points per person-month.

Which Rottenpotatoes feature below is least smart? - Given I have a free movie pass, I want to redeem it for an eligible movie before it expires - As a user, I want to search for a movie by title - When adding a movie, 99% of Add Movie pages should appear within 3 seconds - As a customer, I want to see the top 10 movies sold, listed by price, so that I can buy the cheapest one first.

Given I have a free movie pass, I want to redeem it for an eligible movie before it expires Explanation: Any of the answers are potentially defensible as not living up to the SMART requirements. The reason the given answer was selected is because it doesn't clarify what "eligible" actually means, and is not specific in general. However, all these stories have room for improvement. We leave it up to you to think about what those improvements might be?

What does each keyword typically imply/do?

Given: usually set up some preconditions, such as navigating to a page. Identifies current state. When: typically use one of Cucumber's built-in web steps to simulate the user pressing a button, for example. Identifies the action. Then: usually check to see if some condition is true. Identities the consequence of the action. And/But: allows more complicated versions of Given, When, or Then phrases

What reduces the chances of a project being late or over budget?

Having a working prototype and prioritizing features

Wha are techniques for testing Requirements Documentation Specifications?

Having stakeholders—developers, customers, testers, and so on—proof-read the document, trying to build a prototype that includes the basic features, and generating test cases that check the requirements.

How do you make sure your story is Achievable?

Ideally, you implement the user story in one Agile iteration. If you are getting less than one story per iteration, then they are too big and you need to subdivide these stories into smaller ones

What are imperative versus declarative scenarios?

Imperative: specifying a logical sequence of user actions: filling in a form, clicking on buttons, and so on. Imperative scenarios tend to have complicated When statements with lots of And steps. Declarative: focus the attention on the feature being described rather than the low-level steps you need to set up and perform the test. WHAT not HOW Declarative scenarios are simpler, less verbose, and more maintainable than imperative scenarios.

What is the difference between explicit versus implicit requirements?

Implicit requirements are the logical consequences of explicit requirements, and typically correspond to integration tests Example of an implicit requirement in RottenPotatoes might be that by default movies should be listed in chronological order by release date.

Name three plan-and-document techniques that help with requirements elicitation.

Interviewing, Scenarios, and Use Cases.

Which SMART guideline(s) does the feature below violate? "Feature: RottenPotatoes should have a good User Interface"

It is not Specific, not Measurable, not Achievable (within 1 iteration), and not Timeboxed. While business Relevant, this feature goes just one for five.

What is collective ownership?

Knowledge of different parts of the project being diffused around the team

What are Lo-Fi sketches?

Low cost ways to explore the user interface of a user story. Paper and pencil makes them easy to change or discard, which once again can involve all stakeholders.

What is an iteration?

Maintaining a working prototype while deploying new features typically every two weeks (this is the iteration)

For the last 3 iterations, Team Blue's average velocity is 8, Team Gold's is 4. Which, if any, comparison between the Blue and Gold teams is valid? - Blue is twice as productive as Gold - Blue has completed more stories than Gold - None of these answers are valid Blue has more developers than Gold

None of these answers are valid Explanation: Recall that average velocity is a concept that is contained within the team. Comparing velocities between one team and another doesn't make sense. A Velocity of a 4 for one team provides no detail about what a velocity of 4 for another team would be.

What is a step definition?

Ruby code to test steps

What is an epic?

Set of sub-storied making up a >4 point story grouped together

What is the burn down chart?

Shows work to be done (points) on the vertical axis and time along the horizontal axis. Points and velocity are often used as the basis Slope of the downward-pointing line is the team's velocity The line's intersection with the x-axis represents the prediction for when the work will be done

Where does someone document the requirements?

Software Requirements Specification (SRS) Included is: 1. Validity-are all these requirements really necessary? 2. Consistency-do requirements conflict? 3. Completeness-are all requirements and constraints included? 4. Feasibility-can the requirements really be implemented?

What does SMART stand for?

Specific, Measurable, Achievable, Relevant, and Timeboxed.

What does adding a new feature for a SaaS app normally entail?

Specify a UI for the feature, write new step definitions, and perhaps even write new methods before Cucumber can successfully color steps green.

What is cooperatively create scenarios (as a technique of Requirements Elicitation)?

Start with an initial assumption of the state of the system, show the flow of the system for a happy case and a sad case, list what else is going on in the system, and then the state of the system at the end of the scenario.

Which is FALSE about Cucumber and Capybara? - A Feature has one or more Scenarios, which are composed typically of 3 to 8 Steps - Cucumber matches step definitions to scenario steps using regexes, and Capybara pretends to be user that interacts with SaaS app accordingly - Step definitions are in Ruby, and are similar to method calls, while steps are in English and are similar to method definitions - Steps use Given for current state, When for actions, and Then for consequences of actions

Step definitions are in Ruby, and are similar to method calls, while steps are in English and are similar to method definitions Explanation: The statement is almost correct, except step definitions are more similar to method definitions (not calls), while steps are more similar to method calls (not definitions)

What does Timeboxed mean?

Stop developing a story once you've exceeded the time budget. Either you give up, divide the user story into smaller ones, or reschedule what is left according to a new estimate.

What is planning poker?

Team members simultaneously "vote" on the difficulty of a story and then discuss discrepancies, This is a quick and practical way to estimate points while diffusing knowledge of the project throughout the team.

How do you Ensure Implementation Matches Requirement Features

The Agile process consolidates these many major tasks into three tightly coupled ones: User Stories, acceptance tests in Cucumber, and the code that comes from BDD/TDD process. Plan-and-document methodologies involve many more mechanisms without tight integration. Traceability to link features to tests, reviews, and code

What are user stories?

The BDD version of requirements. They describe how the application is expected to be used User story can be formulated as acceptance test before code is written. (checking correctness)

What is a backlog?

The collection of stories that have been prioritized and assigned points in this way, but have not yet been started in this iteration

Which expression statement regarding cost estimation is true? - As practitioners of pair programming, PL estimates cost for 1 pair, which it assigns to complete project - As studies show 84%-90% of projects are on-time and on-budget, plan and document managers promise customers a set of features for an agreed upon cost by an agreed upon date. - The cost bid is for PL time and materials that covers number of weeks in the estimate - As practitioners of Agile Development, PL does not use contracts

The cost bid is for PL time and materials that covers number of weeks in the estimate

What are the general guidelines for a user story?

The general guidelines for the user stories themselves is that they must be testable, be small enough to implement in one iteration, and have business value.

What is the goal of BDD?

The goal of BDD requirements is validation (build the right thing), not just verification (build the thing right) BDD concentrates on the behavior of the app vs. the implementation

What do storyboards capture?

The interaction between different pages depending on what the user does. It is much less effort to experiment in this low cost medium before using Haml and CSS to create the pages you want in HTML.

What is Requirements Elicitation?

The three techniques are Interviewing, creating scenarios, and creating use cases.

What is the origin of User Stories?

They came from the Human Computer Interface (HCI) community. They developed them using 3-inch by 5-inch index cards or "3-by-5 cards," or in countries where metric paper sizes are used, A7 cards of 74 mm by 105 mm These cards contain one to three sentences written in everyday nontechnical language written jointly by the customers and developers.

What are the 3x5 cards?

They each have a user story of one to three sentences, are an easy and nonthreatening technology that lets all stakeholders brainstorm and prioritize features.

How are the Cucumber keywords Given, When, Then, And, and But the same?

They have different names just for benefit of human readers, but they are all aliases to the same method. Thus, you don't have to remember the syntax for many different keywords.

User Story 1: See which of my friends are going to a show - As a theatergoer - So that I can enjoy the show with my friends - I want to see which of my Facebook friends are attending a given show. User Story 2: Show patron's Facebook friends - As a box office manager - So that I can induce a patron to buy a ticket - I want to show her which of her Facebook friends are going to a given show.

This should be left as 2 stories because the functionality and user experience may be different, & both may be important. Explaination: The goal of user stories is for customers and developers to agree on what is important. If there are stories that might seem similar, but address value from two different points of view, it is better to leave the stories separate to reflect what the customer wants for their business. Ultimately, it's not up to developers to merge these stories without discussing with the customer.

What is the purpose of velocity?

To give all stakeholders an idea how many iterations it will take a team to add the desired set of features, which helps set reasonable expectations and reduces chances of disappointment.

True or False: Cucumber matches scenario steps to step definitions using regexes and Capybara pretends to be a user that interacts with the SaaS application according to these scenarios.

True

True or False: The purpose of the Lo-Fi UI and storyboards is to debug the UI before you program it.

True

True or False: User stories on 3x5 cards in BDD play the same role as design requirements in plan-and-document.

True

What does the tool Pivotal Tracker measure?

Velocity, which is the rate of completing stories of varying difficulty. Recommended setup: - icebox: user stories that haven't been prioritized/pointed valued yet - backlog: stories in priority order and assigned to member (not yet started) - current iteration: stories in progress

When should a spike be distributed?

When there is a major source of uncertainty, such as figuring out how to integrate a new technology or library.

What is the role of the project manager?

While the whole team may participate in requirements elicitation and risk analysis and help document them, it is up to the project manager to estimate costs, make and maintain the schedule, and decide which risks to address and how to overcome or avoid them.

What does BDD emphasize?

Working with stakeholders to define the behavior of the system being developed. Stakeholders include nearly everyone: customers, developers, managers, operators,

What does Pivotal Tacker do?

a Web-based tool that allows a team to enter and prioritize user stories with point values, assign stories to developers, attach design documents such as lo-fi mockups to stories, and perhaps most importantly, track points and velocity as stories are delivered, optionally generating a variety of analytics including burn down charts.

What is Capybara?

a tool in Rails that will act as a user and pretend to use the feature under different scenarios. Capybara "pretends to be a user" by taking actions in a simulated web browser, for example, clicking on a link or button. Capybara can interact with the app to receive pages, parse the HTML, and submit forms as a user would.

What does Measurable mean?

each story should be testable, which implies that there are known expected results for some good inputs. Write goals that are measurable in those measurements!

What is creating use cases? (as a technique of Requirements Elicitation)

lists of steps between a person and a system to achieve a goal

How do you keep up with Change Management for Requirements, Cost, and Schedule?

version control systems are needed for evolving documents as well as for programs, so the norm should be checking in the revised documentation along with the revised code.

Where do the common parts of the page layout—banners, structural divs, and so on go?

views/layouts/application.html.haml.

What is interviewing (as a technique of Requirements Elicitation)?

where stakeholders answer predefined questions or just have informal discussions.


Ensembles d'études connexes

VIRGINIA v. BLACK (538 U.S. 343)

View Set

Gestalt Theory and Therapy - Chapter 6

View Set

Philosophy 103 (5. Psychological and Ethical Egoism)

View Set

MLT Chemistry/Special Chemistry Quiz Review

View Set