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

Write tests #10

Closed
aleeusgr opened this issue Nov 23, 2022 · 4 comments
Closed

Write tests #10

aleeusgr opened this issue Nov 23, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@aleeusgr
Copy link
Owner

aleeusgr commented Nov 23, 2022

How to write a testing suite for this application?

  1. Most straightforward way is to write a shell script, iterate over jsons and send each via curl, compare outputs to one verified by hand.
  2. Use Haskell testing tools: Hunit, Tasty, QuickCheck - for automation and efficiency
  3. Code coverage

input-output-hk/Developer-Experience-working-group#41

@aleeusgr aleeusgr added the enhancement New feature or request label Nov 23, 2022
@aleeusgr
Copy link
Owner Author

@aleeusgr
Copy link
Owner Author

aleeusgr commented Nov 24, 2022

Unit testing:

See:
sidan-lab/plutus-cborhex-automation#27

what Spock does can be abstracted as a function. Ideally, it does not matter framewhat work you are using, a unit test is a request to the endpoint that contains correct data.
The output of the function is compared to the set of expected outputs, it could be a file containing a json file.

todo: 

@aleeusgr
Copy link
Owner Author

Integration tests:

@aleeusgr aleeusgr transferred this issue from aleeusgr/plutus-cborhex-automation Dec 16, 2022
@aleeusgr
Copy link
Owner Author

aleeusgr commented Jan 3, 2023

A test with IO; File -> Bool
aleeusgr/aoc#2

What it tests for? How does it break?
ghc, file is missing, ...

@aleeusgr aleeusgr closed this as completed Jan 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant