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

Convert binaries in "source" folders #914

Open
costateixeira opened this issue Jun 25, 2024 · 5 comments
Open

Convert binaries in "source" folders #914

costateixeira opened this issue Jun 25, 2024 · 5 comments
Assignees

Comments

@costateixeira
Copy link
Collaborator

Add support for having source files like gherkin files (which get used in a testplan.testRun.script.sourceReference) as a Binary.
Then these files would be rendered as text, monospaced, possibly with syntax highlighting (using script.language to identify which language)

  • We could add an ig parameter to determine what are the "folders" that contain code that creates Binary instances
  • The publisher needs to consider these binaries as NOT examples

@brynrhodes - instead of Binary, are there reasons to use Library?

@grahamegrieve
Copy link
Contributor

we already have all this

@lmckenzi
Copy link
Contributor

lmckenzi commented Jul 2, 2024

Jose will work with Bryn on how best to make Gherkin work via this approach - and determine if this approach makes sense in this use-case.

@JohnMoehrke
Copy link
Contributor

I have a sample IG that includes Gherkin. This is an example of an IG that is focused on testing of another IG, a concept that is independent from the current git issue. This IG can be used to see what Gherkin scripts might look like. This IG can also see various ways in which it would be useful to expose the Gherkin script within an IG.

Github - https://github.com/JohnMoehrke/ConsentWithSeg-testing
CI build - https://build.fhir.org/ig/JohnMoehrke/ConsentWithSeg-testing/branches/main/index.html

  • Gherkin has a file format, with an extension .feature, and a mime type text/x-gherkin
    • These can be loaded as binary using the normal method of loading a binary
    • a Binary resource load does throw an error in the QA, while still working.
  • Gherkin is considered a script that is human readable. Thus it is considered both a test script and a human narrative of that script
  • The R5 TestPlan resource could call upon the feature file in multiple ways
    • testCase.testRun.script.sourceString -- no good way to call upon the feature file
    • testCase.testRun.script.sourceReference -- could reference a DocumentReference that pulls in the feature file using the binary method
    • testCase.testRun.script.narrative -- no good way to call upon the feature file
  • Gherkin is considered human consumable; thus it is useful to include it in the human narrative -- https://build.fhir.org/ig/JohnMoehrke/ConsentWithSeg-testing/branches/main/testplan.html -- because of this it would be helpful if the narrative could call upon the feature file to be displayed in a code block.

The test IG shows a testPlan with all (many) of the above combinations. Some of these issues are unique to Gherkin, but might still be useful for other things. Some of these issues may be specific to TestPlan resource definition.

@litlfred
Copy link

litlfred commented Jul 9, 2024

we also have several Gherkin/Cucumber examples we would want to pull into this approach

@JohnMoehrke
Copy link
Contributor

JohnMoehrke commented Jul 26, 2024

We need .feature file extension added to the acceptable binary file types. as today we get an ERROR

Unknown file type give-consent.feature

I added #930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for Input
Development

No branches or pull requests

5 participants