Skip to content

Blawx Implementation #21

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

Merged
merged 18 commits into from
Aug 27, 2020
Merged

Blawx Implementation #21

merged 18 commits into from
Aug 27, 2020

Conversation

Gauntlet173
Copy link
Contributor

#14

Copy link
Member

@Br3nda Br3nda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add some tests? The expected results are in https://github.com/ServiceInnovationLab/example-rules-as-code/tree/master/shared

And also add the test command into the circleci config.

@Gauntlet173
Copy link
Contributor Author

Blawx is not a command-line tool, and doesn't have an API, yet. Automated testing of the code is difficult, still. One of the downsides of visual coding environments.

If you like, I can generate all the tests inside the code, so you can run them all when you load the code. It currently only contains one where you can modify the three parameters.

I'm not familiar with circleCI, so let me know what you need, in that context.

@Br3nda
Copy link
Member

Br3nda commented Oct 10, 2019

circleci is our CI. Add a job to the yaml here:
https://github.com/ServiceInnovationLab/example-rules-as-code/blob/master/.circleci/config.yml

it can run the examples in the csv and check that Blawx is calculation the correct response.

@Gauntlet173
Copy link
Contributor Author

Sorry, I wasn't clear.

Because Blawx is not a command-line tool (it's a visual web app), and because it does not have an API that I could send data to and test the responses from (yet), I would need to use some sort of BDD tool that has circleci integration, like cypress, to automate the tests.

I have no experience with BDD tools, so learning cypress is a big ask for a demo toy implementation.

If the tests are mandatory, then I'd rather wait until Blawx gets a public-facing API, and I'll write the tests in python with requests. But it will be a delay.

I can put a manual test inside the folder, that the user can run in 4 clicks. But if that's not good enough, let me know, and I'll do a different PR when the API is up and running.

Thanks.

@Br3nda
Copy link
Member

Br3nda commented Oct 11, 2019

How do you test code in blawx?

@Gauntlet173
Copy link
Contributor Author

Here's an example. You would load the test .blawx file in the web interface, and you would get something like this:

image

Then you would choose "Menu", "Run Blawx Code", and the reasoner will say "Yes" if all the tests succeeded, and "No" if any of them failed.

That's a bare-bones example. It could be made more complicated if necessary.

@Gauntlet173
Copy link
Contributor Author

PR just to give you the option of including it in the repo if you'd like, despite the fact it doesn't have code to automate the testing. In theory, you could write a python script or something to send a test request to the API, and calculate the results. But that would be using Python, not Blawx.

@Br3nda
Copy link
Member

Br3nda commented Aug 27, 2020

cool. let's merge it.

thank you for this work

@Br3nda Br3nda merged commit c0ef52c into BetterRules:master Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants