LiTech Data Observability Help

Test cases

Test suite

  • API endpoint: /api/v1/testcases/testsuite

  • Type: POST

  • Description: Returns test cases for test suite(s)

  • Parameters: names

  • Example body:

{ "names": [ "covid", "rfam" ] }
  • Result

[ { "testSuiteName": "Covid", "connectionName": "Covid endpoint", "description": "Covid infections in Estonia", "sql": "SELECT Confirmed FROM <object> WHERE date > current_date-1\n", "expectedResult": ">0", "lastResult": "271500.0", "lastExecution": "2022-01-20 12:00:47", "status": "nok", "executedBy": "System", "owner": "John", "type": "Query" }, { "testSuiteName": "Rfam", "connectionName": "Rfam_public", "description": "Rfam._annotated_file - Count of rows", "sql": "SELECT COUNT(*) FROM Rfam._annotated_file", "expectedResult": ">0", "lastResult": "4074", "lastExecution": "2022-01-21 09:40:31", "status": "ok", "executedBy": "System", "owner": "John", "type": "Query" }, { "testSuiteName": "Rfam", "connectionName": "Rfam_public", "description": "Rfam._annotated_file - Full duplicates", "sql": "SELECT COUNT(*) FROM (SELECT rfam_acc,seed,cm,full FROM Rfam._annotated_file GROUP BY rfam_acc,seed,cm,full HAVING COUNT(*)>1) a", "expectedResult": "=0", "lastResult": "0", "lastExecution": "2022-01-21 09:40:31", "status": "ok", "executedBy": "System", "owner": "John", "type": "Query" } ]

Execute

  • API endpoint: /api/v1/testcases/execute

  • Type: POST

  • Description: Executes selected test(s) and returns result(s)

  • Parameters: test filters, variables

  • Example body:

{ "testIds": [ 24, 52, 67 ], "descriptionFilters": [ "price" ], "sqlFilters": [ "price_usd" ], "connectionFilters": [ "crypto" ], "testsuiteFilters": [ "Crypto" ], "labelFilters": [ "label1", "label2" ], "variables": { "variable_name_1": "variable_value_1", "variable_name_2": "variable_value_2" } }
  • Result

{ "count": 3, "results": [ { "testSuiteName": "Crypto", "connectionName": "Crypto", "description": " BitCoin price test", "sql": "SELECT price_usd FROM API.object WHERE id = 33422 ", "expectedResult": ">0", "lastResult": "22440.88", "lastExecution": "2023-03-05 15:01:22", "status": "ok", "executedBy": "John", "owner": "John", "info": "g", "type": "Query" }, { "testSuiteName": "Crypto", "connectionName": "Crypto", "description": " Dogecoin price test", "sql": "SELECT price_usd FROM API.object WHERE id = 2 ", "expectedResult": ">0", "lastResult": "0.076033", "lastExecution": "2023-03-05 15:01:22", "status": "ok", "executedBy": "John", "owner": "John", "type": "Query" } ] }
  • API endpoint: /api/v1/testcases/search

  • Type: POST

  • Description: Returns selected test(s) result(s)

  • Parameters: test filters

  • Example body:

{ "testIds": [ 24, 52, 67 ], "descriptionFilters": [ "price" ], "sqlFilters": [ "price_usd" ], "connectionFilters": [ "crypto" ], "testsuiteFilters": [ "Crypto" ] }
{ "count": 3, "results": [ { "testSuiteName": "Crypto", "connectionName": "Crypto", "description": " BitCoin price test", "sql": "SELECT price_usd FROM API.object WHERE id = 33422 ", "expectedResult": ">0", "lastResult": "22440.88", "lastExecution": "2023-03-05 15:01:22", "status": "ok", "executedBy": "John", "owner": "John", "info": "g", "type": "Query" }, { "testSuiteName": "Crypto", "connectionName": "Crypto", "description": " Dogecoin price test", "sql": "SELECT price_usd FROM API.object WHERE id = 2 ", "expectedResult": ">0", "lastResult": "0.076033", "lastExecution": "2023-03-05 15:01:22", "status": "ok", "executedBy": "John", "owner": "John", "type": "Query" } ] }

History

  • API endpoint: /api/v1/testcases/\{id\}/history

  • Type: GET

  • Description: Returns selected test execution history

  • Result

[ { "result": "212112", "executionTime": "2024-03-08 13:25:28", "executionEnd": "2024-03-08 13:25:29", "status": "nok", "executedBy": "System", "durationInSeconds": 1, "additionalResult": [] }, { "result": "ERROR - Connection failed", "executionTime": "2024-03-08 11:36:53", "executionEnd": "2024-03-08 11:53:57", "status": "error", "executedBy": "System", "durationInSeconds": 1024, "additionalResult": [] } ]
Last modified: 18 March 2024