CGI-FR / CGI-FR/PIMO

[PROPOSAL] export a pimo play sandbox as venom test

Open
#144 2 comments 0 reactions 1 assignee Claimed by @giraud10 View on GitHub
Dominant language
Go
Stars
43
Forks
16
PR merge metrics
No merged PRs in 30d

Description

This is a proposal to add link in the pimo play page to export current status as non regression test in venom test.

We could create a drop-down buttons list on the upper right corner (similar to https://jqplay.org/).
Buttons :

Share : copy link
Export as Venom Test

![image](https://user-images.githubusercontent.com/139655/180742770-35600a94-dc12-48bf-a8c5-22cddb2e094a.png)

the venom test template is :

```yaml
name: "test generated from pimoplay "
testcases:
- name: declaring cache
steps:
- script: rm -f masking.yml
- script: |-
cat > masking.yml <
EOF
- script: |-
cat > input.jsonl <
EOF
- script: |-
cat > expected.jsonl <
EOF
- script: |-
< input.jsonl pimo > result.jsonl
assertions:
- result.code ShouldEqual 0
- script: |-
diff expected.jsonl result.jsonl
assertions:
- result.code ShouldEqual 0
- result.systemout ShouldBeEmpty

```

- Share Button copy current link into the clipboard.
- Venom Test button download a `pimo-test.yaml` file as a base64 [data url](https://developer.mozilla.org/fr/docs/Web/HTTP/Basics_of_HTTP/Data_URLs)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.