Skip to content

Commit

Permalink
TechnologyBrewery#119 Point Behave test suite to new formatter, kappa…
Browse files Browse the repository at this point in the history
…-maki, to address malgenerated test reports
  • Loading branch information
cpointe-ibllanos committed Apr 23, 2024
1 parent 1719665 commit 79020ec
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
public class BehaveBddTestMojo extends AbstractHabushuMojo {

protected static final String BEHAVE_PACKAGE = "behave";
protected static final String BEHAVE_CUCUMBER_FORMATTER = "behave-cucumber-formatter";
protected static final String BEHAVE_CUCUMBER_FORMATTER = "kappa-maki";

/**
* Options that should be passed to the behave command. <b>NOTE:</b> If this
Expand Down Expand Up @@ -114,7 +114,7 @@ public void doExecute() throws MojoExecutionException, MojoFailureException {

if (outputCucumberStyleTestReports) {
poetryHelper.installDevelopmentDependency(BEHAVE_CUCUMBER_FORMATTER);
executeBehaveTestArgs.add("--format=behave_cucumber_formatter:PrettyCucumberJSONFormatter");
executeBehaveTestArgs.add("--format=kappa_maki.kappa_maki_formatter:PrettyCucumberJSONFormatter");
executeBehaveTestArgs.add("--outfile=target/cucumber-reports/cucumber.json");
executeBehaveTestArgs.add("--format=progress2");
}
Expand Down
4 changes: 2 additions & 2 deletions habushu-mixology-consumer/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ python = "^3.11"


[tool.poetry.group.dev.dependencies]
behave-cucumber-formatter = ">=1.0.1"
kappa-maki = ">=1.0.0"

[tool.poetry.dev-dependencies]
black = ">=24.3.0"
behave = "^1.2.6"
behave = ">=1.2.6"

[build-system]
requires = ["poetry-core>=1.6.0"]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@manual
Feature: Given a Python module with at least one automated test and one or more manual tests, I should be able to view
an HTML report of the Behave tests

Scenario: Generate reports with manual tests present
Given a Python module with at least one automated test and at least one manual test
When I build the python module
Then my build should succeed
And I should be able to see a HTML report of the tests in the target directory
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from behave import *


@given("a Python module with at least one automated test and at least one manual test")
def step_impl(context):
return


@when("I build the python module")
def step_impl(context):
return


@then("my build should succeed")
def step_impl(context):
return


@then("I should be able to see a HTML report of the tests in the target directory")
def step_impl(context):
return
4 changes: 2 additions & 2 deletions habushu-mixology/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ uvicorn = {version = "^0.18.0", extras = ["standard"]}

[tool.poetry.dev-dependencies]
black = ">=24.3.0"
behave = "^1.2.6"
behave = ">=1.2.6"
grpcio-tools = "^1.48.0"
python-dotenv = "^0.20.0"

[tool.poetry.group.dev.dependencies]
behave-cucumber-formatter = ">=1.0.1"
kappa-maki = ">=1.0.0"

[build-system]
requires = ["poetry-core>=1.6.0"]
Expand Down

0 comments on commit 79020ec

Please sign in to comment.