Make writing tests more convenient
Opened this issue · 7 comments
krzema12 commented
For example, the Kotlin code can be generated that shows a strict testcase for given axes parameters.
krzema12 commented
Idea: if the assertion fails, display a strict visualization, but not as a Kotlin code, but a 2D grid with axis markers.
Take into account the following edge cases:
- the function's value exceeds Y axis' range - mark it with some arrow, to point the user that the function goes beyond the visualization
- for a probed X value, the function returns "not a number" (e. G. Division by 0) or +/- infinity - for now, let's treat it as an invalid function - for such value, there cannot be a valid constraint. At most, no constraint at all for this X value
Ideas on the message:
- first graph: what the user gave. Use emojis ✔️ and ❌ above the columns to mark which columns contain fulfilled assertions, and for which the assertions fail
- second graph, below: suggested minimal assertions
krzema12 commented
An alternative idea is to produce an image for each test, showing the visualization of both the actual function and the assertions.
krzema12 commented
Consider using:
- https://github.com/nwillc/ksvg for SVG generation
- https://github.com/holgerbrandl/kravis
krzema12 commented
For each failed test:
- produce a SVG code
- embed the code in a URL to a tool
- the tool should take whatever is given as GET parameter, and convert it to website's content - see https://github.com/krzema12/html2url
krzema12 commented
krzema12 commented
During working on a proof of concept, I hit "Error: URI Too Long" issue.
krzema12 commented
A stub of a helper project: https://github.com/krzema12/PlotAssertVisualizer