feat: add support for optional YAML frontmatter in test text files - #6
Conversation
Added support for parsing optional YAML frontmatter at the top of test files using `eo-yaml`. The parsed values can override the dynamically generated `test-name` and `case-name` for test cases. Also extracts `description` if present. Includes dynamic test URIs for proper test linking in IDEs. Co-authored-by: ChrisAkre <256899919+ChrisAkre@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
| @@ -0,0 +1 @@ | |||
| /home/jules/.m2/repository/com/amihaiemil/web/eo-yaml/8.0.6/eo-yaml-8.0.6.jar:/home/jules/.m2/repository/javax/json/javax.json-api/1.1.4/javax.json-api-1.1.4.jar:/home/jules/.m2/repository/io/github/java-diff-utils/java-diff-utils/4.12/java-diff-utils-4.12.jar:/home/jules/.m2/repository/org/opentest4j/opentest4j/1.3.0/opentest4j-1.3.0.jar:/home/jules/.m2/repository/org/assertj/assertj-core/3.24.2/assertj-core-3.24.2.jar:/home/jules/.m2/repository/net/bytebuddy/byte-buddy/1.12.21/byte-buddy-1.12.21.jar:/home/jules/.m2/repository/org/junit/jupiter/junit-jupiter-api/5.9.2/junit-jupiter-api-5.9.2.jar:/home/jules/.m2/repository/org/junit/platform/junit-platform-commons/1.9.2/junit-platform-commons-1.9.2.jar:/home/jules/.m2/repository/org/apiguardian/apiguardian-api/1.1.2/apiguardian-api-1.1.2.jar:/home/jules/.m2/repository/org/junit/jupiter/junit-jupiter-engine/5.9.2/junit-jupiter-engine-5.9.2.jar:/home/jules/.m2/repository/org/junit/platform/junit-platform-engine/1.9.2/junit-platform-engine-1.9.2.jar No newline at end of file | |||
| @@ -0,0 +1,59 @@ | |||
| import re | |||
| @@ -0,0 +1,116 @@ | |||
| import re | |||
| @@ -0,0 +1,81 @@ | |||
| import re | |||
| @@ -0,0 +1,9 @@ | |||
| import re | |||
| @@ -0,0 +1,20 @@ | |||
| import com.amihaiemil.eoyaml.Yaml; | |||
There was a problem hiding this comment.
Don't test the test code by writing tests for the test code. Test the test code by adding frontmatter to an existing set of tests. Specifically add frontmatter to the tests in the src/test/resources/sql tests.
There was a problem hiding this comment.
Added YAML frontmatter to the basic SQL test cases to test the new functionality with real data, and deleted the test scripts.
| @@ -0,0 +1,14 @@ | |||
| import org.junit.jupiter.api.DynamicTest; | |||
| @@ -0,0 +1,13 @@ | |||
| import org.junit.jupiter.api.DynamicTest; | |||
| @@ -0,0 +1,12 @@ | |||
| import com.amihaiemil.eoyaml.Yaml; | |||
Deleted temporary script files used during development and updated the basic SQL tests in `src/test/resources/sql/` to include YAML frontmatter, testing the new feature. Co-authored-by: ChrisAkre <256899919+ChrisAkre@users.noreply.github.com>
Deleted TestFrontmatter.class and TestJunit2.class from the root directory that were accidentally left over from the temporary script testing. Co-authored-by: ChrisAkre <256899919+ChrisAkre@users.noreply.github.com>
Added support for parsing optional YAML frontmatter at the top of test files using
eo-yaml.test-nameanddescriptionfrom expected files, orcase-nameanddescriptionfrom failing/matching files.PR created automatically by Jules for task 9005917620976336464 started by @ChrisAkre