You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A component for displaying the results of a suite of unit tests written in SQL.
The goal is to encourage the creation of tests to improve the quality of applications and APIs built with SQLPage. Using SQL only, you can test the database schema, data manipulation, the behavior of stored procedures, and the functionalities of REST APIs built with SQLPage.
select
'unit_test' as component;
select
(1 = 1) as success,
'The test passed successfully.' as title,
'This is a simple test that always passes.' as description;
select
(1 = 0) as success,
'The test failed.' as title;
Testing is currently not handled at all inside sqlpage, and it's an area I'd like to improve.
But I don't think a graphical sqlpage component is the right answer to this problem.
I would like tests outputs to be available on the command line, so that you can run tests on CI, let an agent run tests, etc...
The direction I would like to go in is a standard sqlpage test command, where you would write your test files in a standard location, not served as a part of the application. You would enter something like sqlpage/tests/my_test.sql
selectsum(status = bad) as actual, 0as expected from my_table, 'no bad statuses'astext;
the run sqlpage test on the cli, get nice error messages nd a non zero return code on failures and it would integrate with whatever you use to run tests automatically on every change to your code, without you having to open a webpage in your browser and scroll to find failing tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A component for displaying the results of a suite of unit tests written in SQL.
The goal is to encourage the creation of tests to improve the quality of applications and APIs built with SQLPage. Using SQL only, you can test the database schema, data manipulation, the behavior of stored procedures, and the functionalities of REST APIs built with SQLPage.