Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add links to label files if exists also into testcase md files #38

Merged
merged 5 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,10 +156,10 @@ Without it the plugin will return `NoClassDefFound` exception and will fail.
#### Accepted Parameters

Plugin works with the following parameters:
* `filePath` - path to the built classes, from where all the names of the tests are taken.
* `generatePath` - path to the place where the documentation should be generated.
* `testsPath` - path to the built classes, from where all the names of the tests are taken.
* `docsPath` - path to the place where the documentation should be generated.
* `generateFmf` - boolean value whether generator should generate also `fmf` metadata or just `Markdown`.

* `generateDirs` - boolean value whether generator should generate folder for each part of package name or not.

### Use SNAPSHOT version

Expand Down Expand Up @@ -191,3 +191,12 @@ And specify GitHub in your pom:
</repository>
</repositories>
```

### Links to labels
Each label could be described in separated file with more details.
In case the files with name in format `<LABEL>.md` exists in directory `labels` in your test-docs path defined via `docsPath`, generator will link these files.
Anyone will be able to see the list of tests that covers a specific label.
Each test case documentation will allow to users to simply clink on label and see the label definition.
Frawless marked this conversation as resolved.
Show resolved Hide resolved

In case the file doesn't exist, a not fill be put right after the label name like that `clients (description file doesn't exist)`.
Frawless marked this conversation as resolved.
Show resolved Hide resolved
This function is only part of mark-down docs generation.
2 changes: 2 additions & 0 deletions docs/actual/option1/labels/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
**Description**: Suspendisse sagittis ultrices augue. Aenean vel massa quis mauris vehicula lacinia. Aliquam id dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac dolor sit amet purus malesuada congue. Aenean fermentum risus id tortor. Praesent in mauris eu tortor porttitor accumsan. Aliquam ante. Quisque porta. Duis condimentum augue id magna semper rutrum. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis risus.

**Details**: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam justo enim, consectetuer nec, ullamcorper ac, vestibulum in, elit. Nullam feugiat, turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio risus sit amet ante. Sed vel lectus. Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Nulla quis diam. Donec quis nibh at felis congue commodo. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Mauris elementum mauris vitae tortor. Praesent id justo in neque elementum ultrices. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. Nullam faucibus mi quis velit. Donec iaculis gravida nulla. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Curabitur ligula sapien, pulvinar a vestibulum quis, facilisis vel sapien. Integer lacinia.

<!-- generated part -->
2 changes: 0 additions & 2 deletions docs/actual/option1/labels/regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
**Description**: Suspendisse sagittis ultrices augue. Aenean vel massa quis mauris vehicula lacinia. Aliquam id dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac dolor sit amet purus malesuada congue. Aenean fermentum risus id tortor. Praesent in mauris eu tortor porttitor accumsan. Aliquam ante. Quisque porta. Duis condimentum augue id magna semper rutrum. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis risus.

**Details**: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam justo enim, consectetuer nec, ullamcorper ac, vestibulum in, elit. Nullam feugiat, turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio risus sit amet ante. Sed vel lectus. Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Nulla quis diam. Donec quis nibh at felis congue commodo. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Mauris elementum mauris vitae tortor. Praesent id justo in neque elementum ultrices. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. Nullam faucibus mi quis velit. Donec iaculis gravida nulla. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Curabitur ligula sapien, pulvinar a vestibulum quis, facilisis vel sapien. Integer lacinia.

<!-- generated part -->
2 changes: 0 additions & 2 deletions docs/actual/option2/labels/regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,3 @@
**Description**: Suspendisse sagittis ultrices augue. Aenean vel massa quis mauris vehicula lacinia. Aliquam id dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac dolor sit amet purus malesuada congue. Aenean fermentum risus id tortor. Praesent in mauris eu tortor porttitor accumsan. Aliquam ante. Quisque porta. Duis condimentum augue id magna semper rutrum. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis risus.

**Details**: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam justo enim, consectetuer nec, ullamcorper ac, vestibulum in, elit. Nullam feugiat, turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio risus sit amet ante. Sed vel lectus. Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Nulla quis diam. Donec quis nibh at felis congue commodo. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Mauris elementum mauris vitae tortor. Praesent id justo in neque elementum ultrices. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. Nullam faucibus mi quis velit. Donec iaculis gravida nulla. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Curabitur ligula sapien, pulvinar a vestibulum quis, facilisis vel sapien. Integer lacinia.

<!-- generated part -->
2 changes: 2 additions & 0 deletions docs/actual/option3/labels/default.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
**Description**: Suspendisse sagittis ultrices augue. Aenean vel massa quis mauris vehicula lacinia. Aliquam id dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac dolor sit amet purus malesuada congue. Aenean fermentum risus id tortor. Praesent in mauris eu tortor porttitor accumsan. Aliquam ante. Quisque porta. Duis condimentum augue id magna semper rutrum. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis risus.

**Details**: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam justo enim, consectetuer nec, ullamcorper ac, vestibulum in, elit. Nullam feugiat, turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio risus sit amet ante. Sed vel lectus. Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Nulla quis diam. Donec quis nibh at felis congue commodo. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Mauris elementum mauris vitae tortor. Praesent id justo in neque elementum ultrices. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. Nullam faucibus mi quis velit. Donec iaculis gravida nulla. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Curabitur ligula sapien, pulvinar a vestibulum quis, facilisis vel sapien. Integer lacinia.

<!-- generated part -->
Frawless marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 2 additions & 0 deletions docs/actual/option4/labels/regression.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
**Description**: Suspendisse sagittis ultrices augue. Aenean vel massa quis mauris vehicula lacinia. Aliquam id dolor. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Sed ac dolor sit amet purus malesuada congue. Aenean fermentum risus id tortor. Praesent in mauris eu tortor porttitor accumsan. Aliquam ante. Quisque porta. Duis condimentum augue id magna semper rutrum. Duis ante orci, molestie vitae vehicula venenatis, tincidunt ac pede. Duis risus.

**Details**: Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Nullam justo enim, consectetuer nec, ullamcorper ac, vestibulum in, elit. Nullam feugiat, turpis at pulvinar vulputate, erat libero tristique tellus, nec bibendum odio risus sit amet ante. Sed vel lectus. Donec odio tempus molestie, porttitor ut, iaculis quis, sem. Nulla quis diam. Donec quis nibh at felis congue commodo. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat. Mauris elementum mauris vitae tortor. Praesent id justo in neque elementum ultrices. Vestibulum erat nulla, ullamcorper nec, rutrum non, nonummy ac, erat. Nullam faucibus mi quis velit. Donec iaculis gravida nulla. Etiam sapien elit, consequat eget, tristique non, venenatis quis, ante. Nulla turpis magna, cursus sit amet, suscipit a, interdum id, felis. Curabitur ligula sapien, pulvinar a vestibulum quis, facilisis vel sapien. Integer lacinia.

<!-- generated part -->
10 changes: 5 additions & 5 deletions docs/expected/option1/md/io/skodjob/DummyTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

**Labels:**

* `regression`
* `clients`
* [regression](../../../labels/regression.md)
* `clients` (description file doesn't exist)

<hr style="border:1px solid">

Expand All @@ -31,8 +31,8 @@

**Labels:**

* `default`
* `regression`
* [default](../../../labels/default.md)
* [regression](../../../labels/regression.md)


## testMethodOne
Expand All @@ -49,7 +49,7 @@

**Labels:**

* `default`
* [default](../../../labels/default.md)


## testMethodThree
Expand Down
10 changes: 5 additions & 5 deletions docs/expected/option2/md/io.skodjob.DummyTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

**Labels:**

* `regression`
* `clients`
* [regression](../labels/regression.md)
* `clients` (description file doesn't exist)

<hr style="border:1px solid">

Expand All @@ -31,8 +31,8 @@

**Labels:**

* `default`
* `regression`
* [default](../labels/default.md)
* [regression](../labels/regression.md)


## testMethodOne
Expand All @@ -49,7 +49,7 @@

**Labels:**

* `default`
* [default](../labels/default.md)


## testMethodThree
Expand Down
10 changes: 5 additions & 5 deletions docs/expected/option3/io.skodjob.DummyTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

**Labels:**

* `regression`
* `clients`
* [regression](labels/regression.md)
* `clients` (description file doesn't exist)

<hr style="border:1px solid">

Expand All @@ -31,8 +31,8 @@

**Labels:**

* `default`
* `regression`
* [default](labels/default.md)
* [regression](labels/regression.md)


## testMethodOne
Expand All @@ -49,7 +49,7 @@

**Labels:**

* `default`
* [default](labels/default.md)


## testMethodThree
Expand Down
10 changes: 5 additions & 5 deletions docs/expected/option4/io/skodjob/DummyTest.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@

**Labels:**

* `regression`
* `clients`
* [regression](../../labels/regression.md)
* `clients` (description file doesn't exist)

<hr style="border:1px solid">

Expand All @@ -31,8 +31,8 @@

**Labels:**

* `default`
* `regression`
* [default](../../labels/default.md)
* [regression](../../labels/regression.md)


## testMethodOne
Expand All @@ -49,7 +49,7 @@

**Labels:**

* `default`
* [default](../../labels/default.md)


## testMethodThree
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void execute() {
} else {
getLog().debug("Skipping fmf generation");
}
MdGenerator.generate(testClass, docsPath + mdDirectoryName + entry.getKey() + ".md");
MdGenerator.generate(testClass, docsPath, mdDirectoryName + entry.getKey() + ".md");

} catch (ClassNotFoundException | IOException ex) {
getLog().warn(String.format("Cannot load %s", entry.getValue()));
Expand Down
Loading