DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

The Latest Agile Topics

article thumbnail
Key Takeaways: Adrian Cockcroft's talk on Netflix, CD, and Microservices
This article was originally published on 3/19/15
August 13, 2022
by Mitch Pronschinske
· 22,536 Views · 1 Like
article thumbnail
Bad or Good? Behavior Driven Development within Scrum.
I wanted to explore the possibility of using JBehave to formalize scrum's definition of done. The idea being to encapsulate a definition of done as a JBehave scenario. So in true scrum style I decided to timebox 4 hours of work dedicated to JBehave. From a scrum point of view BDD can be used to turn the definition of done into a test artifact. The team produces scenarios for each task. With JBehave a scenario file describes the required behavior and test steps it will need to pass to be considered done. I.e Given some prerequisites, perform some action and expect some results. See the JBehave project for more detail as this is only a simple example. Why Examine This Topic? It is useful to examine anything that a programmer may use in the course of doing their work. Not only should we challenge the assumptions that are floating around out there about different programs, but it may also be useful to look at the resources that are available to us and ask ourselves if we are truly using them in the most effective ways possible. There is always the chance that just taking a hard look at some of the elements of the work that we do may help us understand where it can be improved upon when the time comes. Indeed, many people find the concept of examining such things quite appealing, and that leads to major research into these topics. There are a lot of people making incredible strides towards getting things done that the world never believed was possible, but those changes are happening rapidly, and we should all be thankful that this is the case. BDD in 4 hours? So scenarios are just text files describing the required functionality in terms of expected behavior. Even before development though, it's possible to run them and see the pending expectations. Let's wizz through a simple example showing who in a scrum team is responsible for what. I already have a project that I use to explore test patterns so I thought I would just introduce it to that. If you want the working version just take a fork from GitHub. Nb. I have a data fixture used in testing a complex page component. So whilst not a pure scenario I can make its existence part of the Givens. In this project, it's likely that no real given is required, but a developer would add it during the build. First the product owner and tester produce a simple scenario file describing behavior and expectations. Given a data fixture When a page is created with 20 items on a page Then expected lines on a page is 4 with data items in a line 5 Next developers write a harness and flesh out the steps required to meet the behavior. We need to bootstrap the scenario and add steps to it. The general idea is to have a scenario test, that then includes the steps. This is one way of bootstrapping in the steps, other ways are available including a spring system that uses SpringStepsFactory. I ran into problems with the spring system as my project uses spring 3 and JBehave is still locked into spring 2.5.6. In addition, I am using junit 4.8 and spring 2.5.6 requires 4.4. This is ultimately an issue as on many projects. I would not want to tie in those older versions. In fact, other ideas in my project prevent me from doing this too. So in my timebox, I avoid the issue and bootstrap manually. The Bootstrap test class public class SimplePageScenario extends JUnitScenario { public SimplePageScenario() { super(new MostUsefulConfiguration() { @Override public ScenarioDefiner forDefiningScenarios() { return new ClasspathScenarioDefiner( new UnderscoredCamelCaseResolver(".scn"), new PatternScenarioParser()); } }); addSteps(new SimplePageSteps()); } } Before adding the call to addSteps()) running the scenario shows the steps that are pending. (org/testpatterns/scenarios/example_scenario.scn) Scenario: Given a spring data fixture (PENDING) When a page is created with 20 items on a page (PENDING) Then expected lines on a page is 4 with data items in a line 5 (PENDING) Finally the developers fill in the Steps class adding sections that match against the scenario keywords, Given, When and Then. Development is done until the behavior passes the test. public class SimplePageSteps extends Steps { private SimplePage page; private final PageDataFixture dataFixture = new PageDataFixture(); @Given("a data fixture") public void givenASpringDataFixture() { notNull(dataFixture); } @When("a page is created with $itemsOnAPage items on a page") public void createPage(int itemsOnAPage) { page = SimplePage.newInstance(dataFixture.getDataItem(), itemsOnAPage); } @Then("expected lines on a page is $linesOnAPage with data items in a line $itemsInALine") public void validatePage(int linesOnAPage, int itemsInALine) { Map expectedLines = dataFixture.createPageExpectation(linesOnAPage, itemsInALine); Map actualMap = page.getMap(); ensureThat(actualMap, is(expectedLines)); } } Good Points I like the potential to get key scrum members interacting. The collaboration between the testers and the product owner is an important one as it should flesh out questions about behavior at an early stage. Similar benefits occur when the development team starts to get to grip on the behavior. Having a simple scenario artifact means the product owner can get involved with something that actually becomes part of the continuous integration. Bad Points The bootstrap is clumsy. Having to add steps means that after producing the new scenarios development has to get involved before the pending steps appear. There are other ways to bootstrap. The spring system is a step in the right direction, in fact I would like to use injection throughout the application. This still does not solve the problem of having to edit something before the steps appear. I would prefer that once the scenario is in place, steps are automatically found as they are written, and appear as not started until they are cut. Extending the Junit Testcase is also a problem. It's highly likely that in more complex projects we would need mocking techniques or spring-based tests. These have their own runners brought in with the @RunWith annotation. It would be better if there were some way to bootstrap the behavior into any other test framework. In my 4-hour timebox, I did not get the reporting working. Unfortunately, the reporting requires more coding, and setup and is far from being just a bit of maven configuration. When running from maven, things didn't work until I configured the maven-resource-plugin to copy over the scenario files. This should have just worked out of the box. Most of my 4 hours were taken up with configuration which was compounded by the slim documentation. Conclusion Attempting a behavior-driven approach using scenarios is worth doing. I could see the benefits. Not sure if JBehave is the solution for me though. Difficult to configure, and incompatibilities with other frameworks would put me off at the moment. I will find some time to have a look at easyb another Java BDD system next.
August 12, 2022
by $$anonymous$$
· 14,244 Views · 1 Like
article thumbnail
Sprint Goals: How to Write, Manage, and Achieve
This blog is an extended insight on the real purpose of Sprint Goals and how clearly defining and utilizing them can stack a business with benefits.
August 9, 2022
by Harshita Agnihotri
· 6,838 Views · 4 Likes
article thumbnail
Agile Micromanagement — Seriously?
Making Your Scrum Work #27
August 8, 2022
by Stefan Wolpers DZone Core CORE
· 5,165 Views · 4 Likes
article thumbnail
No Sprint Goal, No Cohesion, No Collaboration
Making Your Scrum Work #26
August 3, 2022
by Stefan Wolpers DZone Core CORE
· 8,948 Views · 6 Likes
article thumbnail
Developing a Cloud Adoption Strategy
According to Deloitte's Mike Kavis, there are definitely long-term benefits for organisations when the right cloud adoption strategy is in place.
August 2, 2022
by David Brown DZone Core CORE
· 6,319 Views · 2 Likes
article thumbnail
Top 5 Datadog Integrations To Improve the Efficiency of Tech Teams
Are you looking for Datadog integrations that can skyrocket your team's efficiency? Here are the top 5 recommendations given by experienced DevOps engineers.
August 1, 2022
by Max Shash DZone Core CORE
· 9,165 Views · 2 Likes
article thumbnail
Cloud Tagging Strategic Practices
Cloud tagging is the practice of assigning custom names to cloud resources. Cloud tag comprises two – Key and Value. Key for categories and value for metadata
July 30, 2022
by Sindhu Priya
· 5,013 Views · 1 Like
article thumbnail
Key Metrics and Measurements to Track Project and Product Performance
In this article, we will define the “bare minimum” set of metrics, talk about product success metrics and discuss what can be considered a true agile measure of success.
July 29, 2022
by Artem Markov
· 7,769 Views · 1 Like
article thumbnail
A Breakdown of Continuous Testing
Understand how continuous testing enables the idea of evaluating quality at several stages of a pipeline where code is developed, delivered, and deployed continuously.
July 26, 2022
by Navya Manoj
· 8,441 Views · 5 Likes
article thumbnail
Compatibility Testing: Checklists and Crucial Things You Need to Know About It
Learn about crucial things about compatibility testing that you should know. Here are key points to remember about compatibility testing.
July 26, 2022
by Niranjan Limbachiya
· 8,898 Views · 1 Like
article thumbnail
Unengaged Stakeholders at the Sprint Review
Making Your Scrum Work #25
July 25, 2022
by Stefan Wolpers DZone Core CORE
· 5,018 Views · 3 Likes
article thumbnail
Software Methodologies — Waterfall vs Agile vs DevOps
This article will help you understand the top software methodologies, their advantages, pitfalls, and the difference between them.
July 25, 2022
by Hiren Dhaduk
· 13,669 Views · 3 Likes
article thumbnail
Disciplined Agile Delivery Framework: A Beginner's Guide
This article hopefully gives you ample working knowledge on the concept of the DaD framework, history, lifecycles, principles, pros, cons, and more.
July 25, 2022
by Praise Iwuh
· 6,082 Views · 1 Like
article thumbnail
Creating Routes in KoaJS
Learn how to create dynamic routes using KoaJS Route Parameters.
July 20, 2022
by Saurabh Dashora DZone Core CORE
· 9,868 Views · 3 Likes
article thumbnail
Stakeholder Trust
How to earn your stakeholders' confidence as a team
July 18, 2022
by Stefan Wolpers DZone Core CORE
· 4,151 Views · 3 Likes
article thumbnail
Test Management for QA Engineers
A QA Engineer participate in projects ranging from small maintenance projects, emergency fixes, and mid-range projects to large full-scale projects.
July 14, 2022
by Ayesha Janvekar
· 7,932 Views · 2 Likes
article thumbnail
Overcoming Challenges in End-To-End Microservices Testing
In this guide, we will address critical challenges in end-to-end microservices testing and how you can solve them by staying in sync.
July 12, 2022
by Vivek Mannotra
· 7,859 Views · 2 Likes
article thumbnail
What Is DevOps and Why You Should Have It
Shortening the software development lifecycle and time-to-market are the key benefits businesses get after implementing DevOps procedures.
July 11, 2022
by Anna Smith
· 8,522 Views · 10 Likes
article thumbnail
Prisoners of Retrospectives
What if not all of your team’s members feel enthusiastic about the Sprint Retrospective?
July 10, 2022
by Stefan Wolpers DZone Core CORE
· 6,092 Views · 5 Likes
  • Previous
  • ...
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • ...
  • Next
  • RSS
  • X
  • Facebook

ABOUT US

  • About DZone
  • Support and feedback
  • Community research

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 215
  • Nashville, TN 37211
  • [email protected]

Let's be friends:

  • RSS
  • X
  • Facebook
×