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

ABS tests #95

Open
odino opened this issue Dec 28, 2018 · 2 comments
Open

ABS tests #95

odino opened this issue Dec 28, 2018 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@odino
Copy link
Collaborator

odino commented Dec 28, 2018

Currently, we only test ABS' lexer, parser, evaluator and ability to build cross-platform
At some point, we should definitely have a set of scripts to ensure BC is not broken when releasing a new version of ABS.

What I'm thinking is something like:

  • having a folder that contains example ABS scripts with expected output
  • during each Travis build, loop through that folder and do abs $script, then compare the result

This would allow understanding whether some feature is introducing backward-incompatible changes as well as let us really test ABS cross-platform.

@odino odino added enhancement New feature or request good first issue Good for newcomers labels Dec 28, 2018
@odino odino added this to the cauldron milestone Dec 28, 2018
@ntwrick
Copy link
Contributor

ntwrick commented Feb 23, 2019

@odino:
Take a look at the Bash Automated Testing System (BATS). This might be useful for automating the testing of our ABS scripts in tests/*.abs.

See
https://github.com/bats-core/bats-core
https://testanything.org/
https://opensource.com/article/19/2/testing-bash-bats

I have created a POC for testing these scripts on branch bats-testing. Check it out and take a look at my notes and test cases in tests/test-abs.bats. In particular, note that the TAP format output will be what you get when automation is running instead of the interactive format seen in a terminal via $ bats tests/test-abs.bats. You can force TAP format output in the terminal by using $ bats --tap tests/test-abs.bats to see what the automation will see.

I'm not sure how you integrate this with Travis etc. in github, but it looks promising for driving external ABS script tests including using ABS Init Files, OS env variables, and sourced ABS scripts. Still not an answer for testing the ABS interactive REPL mode, but it seems to handle testing the scripting mode pretty well.

And, another thought: maybe we could re-implement this using ABS instead of bash. This might give us better cross-platform testing capability as BATS is pretty-much Linux bash specific. The downside is that if we break ABS++ then ABS-- has to be stable for testing to work.

@odino
Copy link
Collaborator Author

odino commented Feb 24, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants