0

How to create the following tests:

I have a PostgreSQL script. I want the test to create mock data, call the script on these tables and create the resulting table from the mock data and compare this result with some expected result table that I have defined.

I use pgTAP to test the resulting database, but this way I can only test the tables that were created in the script, but I would want to have multiple tests with different mock data.

Is this possible using pgTAP? Or another way?

This is what my script looks like:

-- loading data from csv into tables
-- many different queries to transform tables into helper table
-- in the end: 

CREATE TABLE result(
    a varchar,
    b varchar
);

insert into result (a, b)
SELECT  ...
FROM ... helper ...
mirkap
  • 7
  • 1
  • 4

0 Answers0