-
Notifications
You must be signed in to change notification settings - Fork 2
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
Conversation
There was a problem hiding this 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.
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. |
circleci is our CI. Add a job to the yaml here: it can run the examples in the csv and check that Blawx is calculation the correct response. |
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. |
How do you test code in blawx? |
Here's an example. You would load the test .blawx file in the web interface, and you would get something like this: 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. |
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. |
cool. let's merge it. thank you for this work |
#14