{"id":16535744,"url":"https://github.com/valfirst/jbehave-junit-runner","last_synced_at":"2025-04-09T15:05:39.342Z","repository":{"id":3257888,"uuid":"4296224","full_name":"valfirst/jbehave-junit-runner","owner":"valfirst","description":"Integrate JBehave better with JUnit. Reports all Stories, Scenarios and Steps as JUnit Suites and Test Cases.","archived":false,"fork":false,"pushed_at":"2025-04-07T08:00:37.000Z","size":1735,"stargazers_count":73,"open_issues_count":30,"forks_count":53,"subscribers_count":100,"default_branch":"master","last_synced_at":"2025-04-09T15:05:33.526Z","etag":null,"topics":["hacktoberfest","jbehave","junit","junit4"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valfirst.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2012-05-11T11:34:14.000Z","updated_at":"2025-04-07T07:59:38.000Z","dependencies_parsed_at":"2023-10-16T23:38:07.764Z","dependency_job_id":"e4a36c47-1b2e-4f82-a189-26f05d87173b","html_url":"https://github.com/valfirst/jbehave-junit-runner","commit_stats":null,"previous_names":["codecentric/jbehave-junit-runner"],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valfirst%2Fjbehave-junit-runner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valfirst%2Fjbehave-junit-runner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valfirst%2Fjbehave-junit-runner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valfirst%2Fjbehave-junit-runner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valfirst","download_url":"https://codeload.github.com/valfirst/jbehave-junit-runner/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055284,"owners_count":21040157,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","jbehave","junit","junit4"],"created_at":"2024-10-11T18:28:45.477Z","updated_at":"2025-04-09T15:05:39.323Z","avatar_url":"https://github.com/valfirst.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"JBehave JUnit Integration\n=========================\n[![jbehave-junit-runner CI](https://github.com/valfirst/jbehave-junit-runner/actions/workflows/ci.yml/badge.svg)](https://github.com/valfirst/jbehave-junit-runner/actions/workflows/ci.yml)\n[![Coverage Status](https://coveralls.io/repos/github/valfirst/jbehave-junit-runner/badge.svg?branch=master)](https://coveralls.io/github/valfirst/jbehave-junit-runner?branch=master)\n[![Quality Gate](https://sonarcloud.io/api/project_badges/measure?project=com.github.valfirst%3Ajbehave-junit-runner\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=com.github.valfirst%3Ajbehave-junit-runner)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/d81f58136aa245668240b7d851a54d50)](https://www.codacy.com/gh/valfirst/jbehave-junit-runner/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=valfirst/jbehave-junit-runner\u0026amp;utm_campaign=Badge_Grade)\n[![Maven Central](https://img.shields.io/maven-central/v/com.github.valfirst/jbehave-junit-runner.svg)](https://central.sonatype.com/search?q=jbehave-junit-runner\u0026namespace=com.github.valfirst)\n[![Javadocs](http://www.javadoc.io/badge/com.github.valfirst/jbehave-junit-runner.svg)](http://www.javadoc.io/doc/com.github.valfirst/jbehave-junit-runner)\n[![Known Vulnerabilities](https://snyk.io/test/github/valfirst/jbehave-junit-runner/badge.svg?targetFile=pom.xml)](https://snyk.io/test/github/valfirst/jbehave-junit-runner?targetFile=pom.xml)\n[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/valfirst/jbehave-junit-runner/master/LICENSE)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvalfirst%2Fjbehave-junit-runner.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvalfirst%2Fjbehave-junit-runner?ref=badge_shield)\n\n\nThis little project is designed to make JBehave\nstories \u0026 scenarios show up in the JUnit view\nin Eclipse and potentially other IDEs that support\ncustom test runners.\n\nInstallation\n==========================\nThe project consists of only a handful of classes\nand is easy to use.\n\n\nUsing Maven\n-------------------\nThe easiest way is to include\nit in your acceptance test project(s) by ways of\na Maven dependency. Binary, Sources and Javadocs are\nall available from Maven Central.\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.valfirst\u003c/groupId\u003e\n    \u003cartifactId\u003ejbehave-junit-runner\u003c/artifactId\u003e\n    \u003cversion\u003e2.3.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\nNote that the JBehave library is set to scope `provided`\nin the POM, because any project using this Runner will\nnaturally have their own version of JBehave already.\n\nCurrent development SNAPSHOT versions are available from\n[Sonatype's Nexus for Open Source projects](https://oss.sonatype.org/content/repositories/snapshots/com/github/valfirst/jbehave-junit-runner/).\n\nWithout Maven\n---------------------\nIf you cannot or do not want to use Maven, just\nadd the library to your classpath.\n\nAlso make sure you add the dependencies of this library to the classpath as well. They can be\nseen in the `pom.xml`. For convenience, they are listed here, too:\n\n  * jbehave-core (4.1+)\n  * junit (4.12)\n\nYour project will of course have JBehave already, just make sure it is version 4.1 or above.\n\n\nUsage\n====================================\nOnce it is on your classpath, the runner can be used\nto visualize the structure and the successes/failures\nof your JBehave acceptance tests.\n\nEnabling\n-------------------------------\nYou will probably already have one or more classes\nthat extend the default JBehave `JUnitStories` class.\nJust add this annotation:\n\n```java\n@RunWith(JUnitReportingRunner.class)\npublic class MyAcceptanceTests extends JUnitStories {\n    ...\n}\n```\n\nUsually, this is everything you have to do. If you want to,\nyou can use a little helper method to configure the configured\nEmbedder so that it works nicely together with the JUnitReportingRunner.\n\n```java\nJUnitReportingRunner.recommendedControls(configuredEmbedder());\n```\n\nThis tells JBehave to use only one thread, and don't throw any exceptions\nwhen generating views or otherwise wrapping the execution up. This would\nconfuse JUnit considerably, rendering the AfterStories Suite incomplete.\n\nCaveats\n----------------------------\nThere are a few issues you might encounter upon first installation and\nintegration into your project. To alleviate these, the following are a\nfew common pitfalls.\n\n### java.lang.NoSuchMethodException: ...storyPaths()\n\nIf you run into problems like this\n\n```java\njava.lang.NoSuchMethodException: MyAcceptanceTests.storyPaths()\n    at java.lang.Class.getDeclaredMethod(Class.java:1937)\n    at org.jbehave.scenario.finegrained.junit.monitoring.JUnitReportingRunner.\u003cinit\u003e(JUnitReportingRunner.java:33)\n    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)\n    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)\n    at java.lang.reflect.Constructor.newInstance(Constructor.java:513)\n    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)\n    ....\n```\n\nyou are likely extending a custom base class which\nwas probably introduced to provide some common methods\nfor all  your test classes. This is perfectly fine,\nhowever in case you pulled up the `storyPaths()` method\ninto that common base class, you\n\n  1. either need to make it public _OR_\n  1. override it in all descendants of that base class\n     (just calling the super implementation is fine).\n\nThis is due to a reflection issue and might be fixed in\nfuture versions.\n\n\n### java.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription\n\nIf you see JUnit throw an error soon after a test starts, that looks like this\n\n```java\njava.lang.NoSuchMethodError: org.junit.runner.Description.createSuiteDescription(Ljava/lang/String;[Ljava/lang/annotation/Annotation;)Lorg/junit/runner/Description;\n    at de.codecentric.jbehave.junit.monitoring.JUnitDescriptionGenerator.createDescriptionFrom(JUnitDescriptionGenerator.java:43)\n    at de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner.buildDescriptionFromStories(JUnitReportingRunner.java:152)\n    at de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner.\u003cinit\u003e(JUnitReportingRunner.java:73)\n    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n    ...\n```\n\nyou most probably have an old version of JUnit on your classpath that does not have\nthat method signature yet. Verify that you are using a recent version of\nJUnit and that it is not hidden by an older version which might hide it by being\ndeclared first on the classpath.\n\nExample output\n=================================\nOnce you are all set, you use the regular `Run As -\u003e JUnit Test`\ncommand in Eclipse. The JUnit view should appear and display something\nlike this:\n\n![Screenshot](https://raw.githubusercontent.com/codecentric/jbehave-junit-runner/master/doc/img/JBehaveJUnitScreenshot.png)\n\n\nReporting Issues\n=================================\nIn case you run into problems or have ideas on how to improve this\npiece of software, please do not hesitate to open an issue in the\nissue tracker, here on GitHub.\n\nTo make things easier (and quicker) for yourself (and us), please\nprovide the following pieces of information in your ticket:\n\n  * The version you are using (e. g. \"1.0.0\" or \"1.0.1-SNAPSHOT as of 2012-05-25\")\n  * If possible, a stack trace of the error.\n  * Ideally, a limited test case that allows us to reproduce the\n    problem locally. This is indeed the best way to get a bug fixed\n    quickly, because we'll have something specific to work on.\n  * Any information about your environment that might be helpful, e. g.\n    your JBehave version, which operating system, etc.\n\nIt might also be a good idea to try, if your particular problem has\nbeen fixed already in the latest snapshot release.\n\nAnd, *of course*, we'd also very much appreciate pull requests for fixes\nthat you have already made yourself. After all, this is where open source\nshines most :)\n\nCredits\n=================================\nThis project is based on the original implementation by Mark Burnett, located at http://code.google.com/p/jbehave-junit-monitor/ which worked with earlier versions of JBehave.\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fvalfirst%2Fjbehave-junit-runner.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fvalfirst%2Fjbehave-junit-runner?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalfirst%2Fjbehave-junit-runner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalfirst%2Fjbehave-junit-runner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalfirst%2Fjbehave-junit-runner/lists"}