Skip to content

Commit

Permalink
added userguide to gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user authored and github-actions committed Oct 13, 2023
1 parent aaeca6c commit 4f46074
Showing 17 changed files with 127 additions and 115 deletions.
6 changes: 3 additions & 3 deletions userguide/android.html
Original file line number Diff line number Diff line change
@@ -475,7 +475,7 @@ <h4 id="_jgiven_android_dependency">JGiven Android Dependency</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">dependencies {
androidTestCompile("com.tngtech.jgiven:jgiven-android:1.2.5")
androidTestCompile("com.tngtech.jgiven:jgiven-android:1.3.0")
}</code></pre>
</div>
</div>
@@ -623,8 +623,8 @@ <h3 id="_example_project">Example Project</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
6 changes: 3 additions & 3 deletions userguide/attachments.html
Original file line number Diff line number Diff line change
@@ -444,7 +444,7 @@
<h2 id="_attachments">Attachments</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Steps can have attachments. This is useful, for example, to save sceenshots during tests or to refer to larger files that should not be printed inline in the report.</p>
<p>Steps can have attachments. This is useful, for example, to save screenshots during tests or to refer to larger files that should not be printed inline in the report.</p>
</div>
<div class="sect2">
<h3 id="_creating_attachments">Creating Attachments</h3>
@@ -527,8 +527,8 @@ <h3 id="_example_taking_screenshots_with_selenium_webdriver">Example: Taking Scr
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
6 changes: 3 additions & 3 deletions userguide/exception_handling.html
Original file line number Diff line number Diff line change
@@ -505,7 +505,7 @@ <h3 id="_expecting_exceptions">Expecting Exceptions</h3>
<div class="sect2">
<h3 id="_a_better_approach">A better approach</h3>
<div class="paragraph">
<p>The above example has still the big disadvantage that it will not visible in the report that an exception is actually expected. More helpful would be the following scenario:</p>
<p>The above example has still the big disadvantage that it will not be visible in the report that an exception is actually expected. More helpful would be the following scenario:</p>
</div>
<div class="listingblock">
<div class="content">
@@ -558,8 +558,8 @@ <h3 id="_a_better_approach">A better approach</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
4 changes: 2 additions & 2 deletions userguide/getting_started.html
Original file line number Diff line number Diff line change
@@ -592,8 +592,8 @@ <h3 id="_using_junit_rules_directly_instead_of_deriving_from_scenariotest">Using
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
92 changes: 49 additions & 43 deletions userguide/index.html

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions userguide/installation.html
Original file line number Diff line number Diff line change
@@ -469,7 +469,7 @@ <h4 id="_maven_dependency">Maven Dependency</h4>
<pre class="highlight"><code class="language-maven" data-lang="maven">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.jgiven&lt;/groupId&gt;
&lt;artifactId&gt;jgiven-junit&lt;/artifactId&gt;
&lt;version&gt;1.2.5&lt;/version&gt;
&lt;version&gt;1.3.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
@@ -480,7 +480,7 @@ <h4 id="_gradle_dependency">Gradle Dependency</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">dependencies {
testImplementation 'com.tngtech.jgiven:jgiven-junit:1.2.5'
testImplementation 'com.tngtech.jgiven:jgiven-junit:1.3.0'
}</code></pre>
</div>
</div>
@@ -500,7 +500,7 @@ <h4 id="_maven_dependency_2">Maven Dependency</h4>
<pre class="highlight"><code class="language-maven" data-lang="maven">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.jgiven&lt;/groupId&gt;
&lt;artifactId&gt;jgiven-testng&lt;/artifactId&gt;
&lt;version&gt;1.2.5&lt;/version&gt;
&lt;version&gt;1.3.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
@@ -511,7 +511,7 @@ <h4 id="_gradle_dependency_2">Gradle Dependency</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">dependencies {
testImplementation 'com.tngtech.jgiven:jgiven-testng:1.2.5'
testImplementation 'com.tngtech.jgiven:jgiven-testng:1.3.0'
}</code></pre>
</div>
</div>
@@ -528,8 +528,8 @@ <h3 id="_java_compiler_note">Java Compiler Note</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2022-10-06 06:31:08 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
4 changes: 2 additions & 2 deletions userguide/intro.html
Original file line number Diff line number Diff line change
@@ -507,8 +507,8 @@ <h4 id="_jgiven_junit_5">JGiven JUnit 5</h4>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
14 changes: 7 additions & 7 deletions userguide/junit5.html
Original file line number Diff line number Diff line change
@@ -466,7 +466,7 @@ <h4 id="_maven">Maven</h4>
<pre class="highlight"><code class="language-maven" data-lang="maven">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.jgiven&lt;/groupId&gt;
&lt;artifactId&gt;jgiven-junit5&lt;/artifactId&gt;
&lt;version&gt;1.2.5&lt;/version&gt;
&lt;version&gt;1.3.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
@@ -477,7 +477,7 @@ <h4 id="_gradle">Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">dependencies {
testImplementation("com.tngtech.jgiven:jgiven-junit5:1.2.5")
testImplementation("com.tngtech.jgiven:jgiven-junit5:1.3.0")
}</code></pre>
</div>
</div>
@@ -486,7 +486,7 @@ <h4 id="_gradle">Gradle</h4>
<div class="sect2">
<h3 id="_use_jgiven_with_junit_5">Use JGiven with JUnit 5</h3>
<div class="paragraph">
<p>JGiven support for JUnit 5 is provided by the <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.2.5/com/tngtech/jgiven/junit5/JGivenExtension.html"><code>JGivenExtension</code></a>
<p>JGiven support for JUnit 5 is provided by the <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.3.0/com/tngtech/jgiven/junit5/JGivenExtension.html"><code>JGivenExtension</code></a>
JUnit 5 extension. You just annotate your JUnit 5 test class with <code>@ExtendWith( JGivenExtension.class )</code>
and JGiven is enabled.</p>
</div>
@@ -514,8 +514,8 @@ <h3 id="_use_jgiven_with_junit_5">Use JGiven with JUnit 5</h3>
</div>
</div>
<div class="paragraph">
<p>Alternatively, you can use one of the test base classes <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.2.5/com/tngtech/jgiven/junit5/ScenarioTest.html"><code>ScenarioTest</code></a>,
<a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.2.5/com/tngtech/jgiven/junit5/SimpleScenarioTest.html"><code>SimpleScenarioTest</code></a> or <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.2.5/com/tngtech/jgiven/junit5/DualScenarioTest.html"><code>DualScenarioTest</code></a> that provide additional convenience methods
<p>Alternatively, you can use one of the test base classes <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.3.0/com/tngtech/jgiven/junit5/ScenarioTest.html"><code>ScenarioTest</code></a>,
<a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.3.0/com/tngtech/jgiven/junit5/SimpleScenarioTest.html"><code>SimpleScenarioTest</code></a> or <a href="http://static.javadoc.io/com.tngtech.jgiven/jgiven-junit5/1.3.0/com/tngtech/jgiven/junit5/DualScenarioTest.html"><code>DualScenarioTest</code></a> that provide additional convenience methods
and allows you to specify stage classes by using type parameters:</p>
</div>
<div class="listingblock">
@@ -547,8 +547,8 @@ <h3 id="_example_project">Example Project</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2022-04-12 07:31:44 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
18 changes: 12 additions & 6 deletions userguide/lifecycle_methods.html
Original file line number Diff line number Diff line change
@@ -489,6 +489,12 @@ <h3 id="_scenario_life_cycle">Scenario Life-Cycle</h3>
</li>
</ol>
</div>
<div class="sect3">
<h4 id="_integration_into_test_frameworks_lifecycles">Integration into Test Frameworks' Lifecycles</h4>
<div class="paragraph">
<p>The relative ordering of JGiven&#8217;s lifecycle methods to that of the embedding test framework depends on how JGiven is hooked into it. For JUnit4, JGiven&#8217;s before and after methods are called later than their respective framework counterparts. Especially the <code>@After</code> method is executed ahead of an <code>@AfterScenario</code> method or an <code>after()</code> method of a scenario rule. For JUnit5 and TestNg, JGiven&#8217;s <code>before()</code> method is executed later than the before method and JGiven&#8217;s <code>after()</code> method is executed ahead of the frameworks' counterparts.</p>
</div>
</div>
</div>
<div class="sect2">
<h3 id="_beforescenario_afterscenario">@BeforeScenario / @AfterScenario</h3>
@@ -497,7 +503,7 @@ <h4 id="_beforescenario">@BeforeScenario</h4>
<div class="paragraph">
<p>Methods annotated with <code>@BeforeScenario</code> are executed before any step of any stage of a scenario.
This is useful for some general scenario setup.
As an example, you could initialize a WebDriver instance for Selenium tests or setup a database connection.
As an example, you could initialize a WebDriver instance for Selenium tests or set up a database connection.
Note that such methods are executed before the injection of values.
Thus, the annotated code must not depend on scenario state fields.</p>
</div>
@@ -534,7 +540,7 @@ <h4 id="_afterscenario">@AfterScenario</h4>
<div class="sect2">
<h3 id="_scenariorule">@ScenarioRule</h3>
<div class="paragraph">
<p><code>@BeforeScenario</code> and <code>@AfterScenario</code> methods are often used to setup and tear down some resource.
<p><code>@BeforeScenario</code> and <code>@AfterScenario</code> methods are often used to set up and tear down some resource.
If you want to reuse such a resource in another stage, you would have to copy these methods into that stage.
To avoid that, JGiven offers a concept similar to JUnit rules.
The idea is to have a separate class that only contains the before and after methods.
@@ -582,7 +588,7 @@ <h4 id="_beforestage">@BeforeStage</h4>
<div class="content">
<pre class="highlight"><code class="language-java" data-lang="java">@BeforeStage
public void setup() {
// do something useful to setup the stage
// do something useful to set up the stage
}</code></pre>
</div>
</div>
@@ -592,7 +598,7 @@ <h4 id="_afterstage">@AfterStage</h4>
<div class="paragraph">
<p>Analogous to <code>@BeforeStage</code> methods, methods can be annotated with <code>@AfterStage</code>.
These methods are executed after all steps of a stage have been executed, but before extracting the values of scenario state fields.
Thus you can prepare state for following stages in an <code>@AfterStage</code> method.
Thus, you can prepare state for following stages in an <code>@AfterStage</code> method.
A typical use case for this is to apply the builder pattern to build a certain object using step methods and build the final object in an <code>@AfterStage</code> method.</p>
</div>
</div>
@@ -677,8 +683,8 @@ <h4 id="_repeatable_stage_methods">Repeatable Stage Methods</h4>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
8 changes: 4 additions & 4 deletions userguide/parameterized_scenarios.html
Original file line number Diff line number Diff line change
@@ -536,7 +536,7 @@ <h3 id="_case_as_description">Case As Description</h3>
"And on the second run, 2, well-done"
} )
@CaseAs( "$1" )
public void coffe_making_gets_better( String description, int runNr, String result ) {
public void coffee_making_gets_better( String description, int runNr, String result ) {
given().a_coffee_machine();
when().I_make_coffee_for_the_$_time( runNr );
then().the_result_is( result );
@@ -548,7 +548,7 @@ <h3 id="_case_as_description">Case As Description</h3>
</div>
<div class="listingblock">
<div class="content">
<pre> Coffe making gets better
<pre> Coffee making gets better

Given a coffee machine
When I make coffee for the &lt;runNr&gt; time
@@ -568,8 +568,8 @@ <h3 id="_case_as_description">Case As Description</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
14 changes: 7 additions & 7 deletions userguide/parameterized_steps.html
Original file line number Diff line number Diff line change
@@ -455,7 +455,7 @@ <h2 id="_parameterized_steps">Parameterized Steps</h2>
<div class="sect2">
<h3 id="_parameters_within_a_sentence">Parameters within a sentence</h3>
<div class="paragraph">
<p>To place parameters within a sentence instead the end of the sentence you can use the $ character.</p>
<p>To place parameters within a sentence instead of the end of the sentence you can use the $ character.</p>
</div>
<div class="listingblock">
<div class="content">
@@ -710,12 +710,12 @@ <h3 id="_the_pojoformat_annotation">The @POJOFormat annotation</h3>
<div class="sect3">
<h4 id="_reuse_a_set_of_namedformat_definitions">Reuse a set of @NamedFormat definitions</h4>
<div class="paragraph">
<p>When several steps uses the same type of POJO in their parameters, it may be tedious to redefine this POJO fields formats in each of these steps.</p>
<p>When several steps use the same type of POJO in their parameters, it may be tedious to redefine this POJO fields format in each of these steps.</p>
</div>
<div class="paragraph">
<p>The solution in this case is to create a custom annotation where POJO fields formats will be declared once and for all.<br>
This custom annotation will be itself annotated with the <code>@NamedFormats</code> which will wraps as much as <code>@NamedFormat</code> as there are fields needing a specific formatting.<br>
It can then further be referenced by any <code>@POJOformat</code> and <code>@Table</code> annotations through their respective <code>fieldsFormatSetAnnotation</code> attribute.</p>
This custom annotation will be itself annotated with the <code>@NamedFormats</code> which will wrap as much <code>@NamedFormat</code> as there are fields needing a specific formatting.<br>
It can then further be referenced by any <code>@POJOFormat</code> and <code>@Table</code> annotations through their respective <code>fieldsFormatSetAnnotation</code> attribute.</p>
</div>
<div class="paragraph">
<p>Given the following POJO :</p>
@@ -898,7 +898,7 @@ <h4 id="_example_2">Example</h4>
</div>
<div class="paragraph">
<p>Also note that POJO fields formats can be specified thanks to the <code>@Table#fieldsFormat</code> or <code>@Table#fieldsFormatSetAnnotation</code> options.<br>
See <a href="#_the_pojoformat_annotation">The @POJOFormat annotation</a> section for more informations about how to use these two options.</p>
See <a href="#_the_pojoformat_annotation">The @POJOFormat annotation</a> section for more information about how to use these two options.</p>
</div>
</div>
</div>
@@ -907,8 +907,8 @@ <h4 id="_example_2">Example</h4>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
12 changes: 6 additions & 6 deletions userguide/report_generation.html
Original file line number Diff line number Diff line change
@@ -569,7 +569,7 @@ <h4 id="_maven">Maven</h4>
&lt;plugin&gt;
&lt;groupId&gt;com.tngtech.jgiven&lt;/groupId&gt;
&lt;artifactId&gt;jgiven-maven-plugin&lt;/artifactId&gt;
&lt;version&gt;1.2.5&lt;/version&gt;
&lt;version&gt;1.3.0&lt;/version&gt;
&lt;executions&gt;
&lt;execution&gt;
&lt;goals&gt;
@@ -647,13 +647,13 @@ <h4 id="_maven">Maven</h4>
<div class="sect3">
<h4 id="_gradle">Gradle</h4>
<div class="paragraph">
<p>There also exists a plugin for Gradle to make you life easier.
<p>There also exists a plugin for Gradle to make your life easier.
Add the following plugins section to your <code>build.gradle</code> file or extend the one you have already accordingly:</p>
</div>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">plugins {
id "com.tngtech.jgiven.gradle-plugin" version "1.2.5"
id "com.tngtech.jgiven.gradle-plugin" version "1.3.0"
}</code></pre>
</div>
</div>
@@ -671,7 +671,7 @@ <h4 id="_gradle">Gradle</h4>
}

dependencies {
classpath "com.tngtech.jgiven:jgiven-gradle-plugin:1.2.5"
classpath "com.tngtech.jgiven:jgiven-gradle-plugin:1.3.0"
}
}

@@ -745,8 +745,8 @@ <h3 id="_configuration_file">Configuration File</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2022-04-11 07:54:09 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
4 changes: 2 additions & 2 deletions userguide/selenium.html
Original file line number Diff line number Diff line change
@@ -476,8 +476,8 @@ <h3 id="_example_project">Example Project</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
8 changes: 4 additions & 4 deletions userguide/spock.html
Original file line number Diff line number Diff line change
@@ -469,7 +469,7 @@ <h4 id="_maven">Maven</h4>
<pre class="highlight"><code class="language-maven" data-lang="maven">&lt;dependency&gt;
&lt;groupId&gt;com.tngtech.jgiven&lt;/groupId&gt;
&lt;artifactId&gt;jgiven-spock&lt;/artifactId&gt;
&lt;version&gt;1.2.5&lt;/version&gt;
&lt;version&gt;1.3.0&lt;/version&gt;
&lt;scope&gt;test&lt;/scope&gt;
&lt;/dependency&gt;</code></pre>
</div>
@@ -480,7 +480,7 @@ <h4 id="_gradle">Gradle</h4>
<div class="listingblock">
<div class="content">
<pre class="highlight"><code class="language-gradle" data-lang="gradle">dependencies {
testImplementation "com.tngtech.jgiven:jgiven-spock:1.2.5"
testImplementation "com.tngtech.jgiven:jgiven-spock:1.3.0"
}</code></pre>
</div>
</div>
@@ -518,8 +518,8 @@ <h3 id="_example_project">Example Project</h3>
</div>
<div id="footer">
<div id="footer-text">
Version 1.2.5<br>
Last updated 2021-09-07 06:46:52 +0200
Version 1.3.0<br>
Last updated 2023-09-08 14:40:48 UTC
</div>
</div>
</body>
Loading

0 comments on commit 4f46074

Please sign in to comment.