@testx/keywords-postgres
A library that extends testx with keywords for testing Postgres databases.How does it work
From the directory of the art code install the package as follows:npm install @testx/keywords-postgres --save
After installing the package you add these keywords to testx by adding the following line to your protractor config file:
testx.keywords.add(require('@testx/keywords-postgres'))
Example testx script:
- execute sql:
sql: SELECT 1;
expected result:
- ?column?: 1
save result to: saved
- execute sql:
sql: SELECT 1;
expected result: '{{saved}}'
- execute sql:
sql: |-
DROP TABLE IF EXISTS test;
CREATE TABLE test (first varchar(20), second integer);
INSERT INTO test(first, second) VALUES ('test1', 12), ('test2', 34);
SELECT * FROM test;
expected result:
- first: test1
second: 12
- first: test2
second: 34