On Judging the Value of Tests - Mailing list pgsql-general

From Jankirk.Vincent., Jamison
Subject On Judging the Value of Tests
Date
Msg-id D09B13F772D2274BB348A310EE3027C61CD78D@g01jpexmbkw24
Whole thread Raw
Responses Re: On Judging the Value of Tests
List pgsql-general

Dear PG Experts,

 

I am entirely very new to PG development.

Currently, I’m studying the test suites, and I feel the more experienced PG devs here could provide some insights on testing because I could not find concrete answers in the Postgres documentations.

 

1.      How do you judge when a test suite is acceptable to be added to Postgres OSS source code? (How do you judge the value of a test suite?)

 

2.      Besides code coverage test, are there other ways/techniques/tools to measure how much value a test would have?

This is coming from a perspective that in the current code coverage (https://coverage.postgresql.org/), some functions were covered because the function was called/run in some tests, while the function/lines may also not necessarily be thoroughly/directly tested so the coverage skips some lines of code inside a block.

 

3.      Is there a standard way of writing tests on the source code that we should follow, like when should test be written in TAP/SQL/C formats and how long should it be?

      I know that TAP test is for client program tests, SQL for regression tests with sql queries, but there are instances also where tests are also written in C like isolation tests, etc. How do we best judge which language is preferred to use when writing tests for Postgres components? How long should a test be when proposing them to hackers page?

             

4.      In the src/test/examples directory (which are all libpq tests), why is the “examples” directory not included when building postgres? (Why weren't these libpq tests added to src/interface/libpq/test or in regression test suite instead?) In short, how to know where (in which file/directory in source code) to put a test?

 

I’d like to apologize for the series of questions, but I’d really like to get insights from the experienced devs.

It's alright if you don't have answers to all questions as this might take much of your time.

Thank you very much.

 

 

Regards,

Kirk Jamison

pgsql-general by date:

Previous
From: Rakesh Kumar
Date:
Subject: Re: backends stuck in "startup"
Next
From: Tom Lane
Date:
Subject: Re: backends stuck in "startup"