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
Newsletter
Log In / Join
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Related

  • When a Coding Agent Fixes the Test Instead of the Bug
  • Testing Java and Spring Applications With Kotlin: Low-Risk to Adoption
  • Your Visual Regression Suite Is Mostly Testing Anti-Aliasing
  • From Issue to Reviewable Patch: Build a Sandboxed Coding Agent With Deep Agents and Automated Tests

Trending

  • Multi-Agent Orchestration on AWS With AgentCore Runtime and A2A
  • Agentic Systems and Design Patterns
  • Building a Software Factory With AI Agents and Workflows
  • AI-Era Cybersecurity, Part 1: Mapping Glasswing, Daybreak, Lightwell and the Tools Racing to Find and Fix Bugs

Draft This article hasn't been published, so readers can't see it.

In moderation This article is waiting for review, so readers can't see it yet.

Deleted This article has been deleted, so readers can't see it.

  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Testing, Tools, and Frameworks
  4. Handling Manual Tests in Serenity BDD

Handling Manual Tests in Serenity BDD

Learn more about handling manual tests in Serenity BDD.

By 
John Ferguson Smart
·
Updated Jul. 03, 19 · Tutorial
Post on X (opens in a new tab) Share on LinkedIn (opens in a new tab)
16.3K Views

Join the DZone community Save articles, join the discussion, and download Refcards and Trend Reports with a free account.

Join for free Already a member? Log in

One of the principles of BDD is to have a single source of truth for both the requirements that describe a feature and the automated tests that verify them. And it is a natural step to want to include both automated and manual tests in this single source of truth.

Cucumber is primarily and traditionally used for automating executable specifications. But with Serenity BDD, you can add special tags to indicate that a scenario represents a manual test case.

In Serenity, you can flag any Cucumber scenario as manual simply by using the @manual tag:

@manual
Scenario: Invoice details should be downloadable as a PDF file
  The layout and content of the PDF file should be verified

  Given Clive has made a purchase
  When he reviews his past orders
  Then he should be able to download his invoice as an PDF file


This scenario will now appear as a manual test case in the Serenity reports:

manual scenario

Recording Test Results

But just flagging a test as manual is a little limited. You can take this reporting further by including the test result with the @manual-result tag. This tag takes values such as passed, failed, and compromised:

@manual
@manual-result:passed
Scenario: Invoice details should be downloadable as a PDF file
  ...


These manual test results are indicated in a different shade in the Serenity reports and also appear in the summary table on the home page:

dashboard with manual results

Associating Manual Test Results With Application Versions

Manual test results are generally only valid for a given version of an application: when a new version is built, the manual tests may need to be redone.

Different projects deal with manual testing in different ways. For example, some teams refer to a target release version and test against this version when a new feature or story is ready to test. They do not, for example, feel the need to redo every manual test for each commit. They assess on a case-by-case basis whether any given changes might impact the features that have already been tested.

For example, suppose a team is working towards a release at the end of the 15th sprint of their project. This is recorded in the Serenity properties file using the current.target.version property:

current.target.version = sprint-15


A tester can say which version they tested directly in the feature file by using the  @manual-last-tested tag:

@manual
@manual:passed
@manual-last-tested:sprint-15
Scenario: Invoice details should be downloadable as a PDF file
   ...


If the versions match, the manual test will be reported as passing. But if they do not match, then the test will be reported as pending, as the feature may need retesting for this new version.

Adding Test Evidence

Sometimes, we need to attach screenshots or other files to our manual test reports as additional evidence. Serenity lets you do this with the @manual-test-evidence  tag. Simply include a link to an external resource (such as a page on Confluence or Sharepoint), or include an image in the src/test/resources/assets folder of your project and use a relative link (starting with "assets"). 

@manual
@manual-result:passed
@manual-last-tested:sprint-15
@manual-test-evidence:https://some.external/link.png
Scenario: Invoice details should be downloadable as a PDF file
   ...


The link to your evidence will appear alongside the manual test result:

Image title

Learn More

You can read more about recording and reporting manual test cases in Serenity in the Serenity Users Manual.

Happy testing!

Testing

Opinions expressed by DZone contributors are their own.

Related

  • When a Coding Agent Fixes the Test Instead of the Bug
  • Testing Java and Spring Applications With Kotlin: Low-Risk to Adoption
  • Your Visual Regression Suite Is Mostly Testing Anti-Aliasing
  • From Issue to Reviewable Patch: Build a Sandboxed Coding Agent With Deep Agents and Automated Tests

Partner Resources

×

Comments

Loading comments

The comments didn't load

Please try again in a moment.

Likes

Loading

The next likes didn't load. Please try again.

The likes didn't load

Please try again in a moment.

See who liked this

Log in or join DZone for free to see who liked this article.

Log in Join for free
  • 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