Skip to content

Releases: TNG/JGiven

v0.14.0-RC1

24 Dec 15:14
Compare
Choose a tag to compare
v0.14.0-RC1 Pre-release
Pre-release

Switch from cglib to ByteBuddy

The internal JGiven interception mechanism was changed to use ByteBuddy instead of cglib. The main reason for this change is support for Android (see below).
From a users perspective, JGiven should behave as before.

Backwards Incompatible Changes

Spring Integration

In order to fix issue #259 the Spring integration was largely rewritten. If you only had used the @EnableJGiven and @JGivenStage annotations, nothing should change.
If you had a custom Spring configuration for JGiven you have to change the following:

  • The classes SpringStepMethodInterceptor and JGivenStageAutoProxyCreator do not exist anymore, you have to remove all references
  • As a replacement the new class JGivenBeanFactoryPostProcessor exists now. You have to register this bean in your Spring configuration

New Features

  • Tags with the same name, but different packages are now correctly distinguished #242 (thanks to ahus1)
  • Scenario states can be marked as required to make scenarios fail quickly and with a clear message if the state hasn't been provided #255

Experimental Android Support

There is a new experimental module called jgiven-android, which enables JGiven support for tests executed on the device or simulator.
This makes it possible to combine JGiven with Espresso tests and even integrate screenshots in the JGiven report.
For details of how to setup and use the Android support have a look at the jgiven-android-test project.

Also see #258

Special thanks to orginx

Fixed Issues

  • Spring Integration: Nested Steps are now supported when using Spring #259

v0.13.0

16 Dec 19:40
Compare
Choose a tag to compare

Backwards Incompatible Changes

In order to fix issue #239, a backwards incompatible change had to be done:

  • The ScenarioBase class is now abstract, because the method getScenario() was made abstract. Thus, subclasses have to implement the getScenario() method.
    As, in general, you should have inherited either from ScenarioTest or SimpleScenarioTest the change should most likely not effect you.
    If you have directly inherited from ScenarioBase, have a look at the ScenarioTest class of how to implement the getScenario() method.

New Features

  • Custom annotations can now also be defined for the @Table annotation #235
  • In addition to text and images, all kinds of media types can now be used as attachments #228 (thanks to ahus1)

Small Improvements

  • Assertion errors shown in the HTML report respect line breaks now. #234

Bug Fixes

  • TestNG: executing test methods in parallel is now possible. #239
  • Correctly handle nested steps in parametrized scenarios. #248
  • Correctly report pending status of parametrized scenarios. #200
  • Spring: added support for executing Spring tests with the Spring JUnit rules instead of the Spring test runner. #250

v0.13.0-RC1

24 Nov 09:02
Compare
Choose a tag to compare
v0.13.0-RC1 Pre-release
Pre-release

Backwards Incompatible Changes

In order to fix issue #239, a backwards incompatible change had to be done:

  • The ScenarioBase class is now abstract, because the method getScenario() was made abstract. Thus, subclasses have to implement the getScenario() method.
    As, in general, you should have inherited either from ScenarioTest or SimpleScenarioTest the change should most likely not effect you.
    If you have directly inherited from ScenarioBase, have a look at the ScenarioTest class of how to implement the getScenario() method.

New Features

  • Custom annotations can now also be defined for the @Table annotation #235
  • In addition to text and images, all kinds of media types can now be used as attachments #228 (thanks to ahus1)

Small Improvements

  • Assertion errors shown in the HTML report respect line breaks now. #234

Bug Fixes

  • TestNG: executing test methods in parallel is now possible. #239
  • Correctly handle nested steps in parametrized scenarios. #248
  • Correctly report pending status of parametrized scenarios. #200
  • Spring: added support for executing Spring tests with the Spring JUnit rules instead of the Spring test runner. #250

v0.12.1

18 Sep 18:37
Compare
Choose a tag to compare

Fixed Issue

  • Fixed an issue in the HTML5 report to correctly show the value instead of an unresolved funtion #233

v0.12.0

18 Sep 17:16
Compare
Choose a tag to compare

New Features

  • Added possibility to use JGiven in JUnit by just using two rules. No deriving from ScenarioTest is necessary anymore, see #232
  • Allow multiple formatter annotations on arguments, e.g., "@Quoted @yesno", see #204.
  • Added a new comment() method to provide further information on specific step method invocations, see #50.
  • Steps can now have multiple attachments #194.
  • Tags can now be hidden from the navigation bar in the HTML report by setting the showInNavigation a
    ttribute to false #211.
  • Added a new CurrentScenario interface similar to CurrentStep.
  • The CurrentScenario interface allows adding tags programmatically, see #172.
  • Allow tag annotations on step methods and step classes.
  • Extended the @as annotation with a provider mechanism, see #189.

Breaking Changes in the JSON model

  • Due to the introduction of multiple attachments per step, the JSON model had to be changed in an backwards-incompatible way. Instead of a single field attachment that holds a single attachment object, a step has now an attachments field that holds an array of attachment objects.

Fixed Issues

  • Fixed an issue that step methods that are all uppercase are formatted in an unexpected way #221
  • Fixed an issue that newlines of formatted arguments have not been formatted in the HTML5 report #226

v0.11.4

11 Jun 12:31
Compare
Choose a tag to compare

Fixed Issues

  • Don't show multiple indexed attachments when cases are not shown as tables #207 (thanks to ahus1)

v0.11.3

20 Mar 08:22
Compare
Choose a tag to compare

New Features

  • The @CaseDescription annotation can now also be applied to the test class #198

Fixed Issues

  • Fixed an issue introduced with v0.11.1 that made the report generation dependent on the locale of the system instead of using utf-8 PR#196 (thanks to ahus1)

v0.11.2

25 Feb 18:27
Compare
Choose a tag to compare

Fixed Issues

  • Fixed an issue introduced with v0.11.1 that for scenarios with attachments and multiple cases, only the attachment of the first case was shown in the HTML report #191

v0.11.1

06 Feb 20:30
Compare
Choose a tag to compare

New Features

HTML Report size reduction

  • The size of the HTML report has been greatly reduced by compressing the scenario data with gzip. This significantly reduces the load time of large reports on slow network connections. #186

Fixed Issues

  • HTML Report: fixed an issue with the search input in the mobile menu that was hidden on mobile devices when the virtual keyboard appeared. #182
  • JUnit: throwing an AssumptionViolationException will not lead to a failed scenario anymore. Instead, the scenario will be ignored and will not appear in the report at all. #185

v0.11.0

07 Jan 08:11
Compare
Choose a tag to compare

New Features

Sections

Scenarios can have sections now. This allows you to structure larger scenarios into several parts with a title. PR#181

Example:

section("This is a section title");
given().something();
when().something();

section("This is another section title");
when().something_else();
then().something();

Sections appear in the console output as well as the HTML report.

Changes regarding colors in the console output

The color used in the console output has been changed. It is now less colorful and usable on dark and light backgrounds. Setting the system property jgiven.report.text.color to true now always enables the color output, even if the output is not a TTY.

Fixed Issues

  • Fixed an issue with carriage returns messing up the cases table. #178
  • Fixed an issue with certain characters used in a @CaseDescription annotation. #177