Bug 40444 - Add a test to ensure all Perl test files use Test::NoWarnings
Summary: Add a test to ensure all Perl test files use Test::NoWarnings
Status: Needs Signoff
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 25515
Blocks: 40315 40375 40382 40386 40387 40442 40443 40448 40449
  Show dependency treegraph
 
Reported: 2025-07-18 09:57 UTC by Jonathan Druart
Modified: 2025-07-18 12:25 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings (11.47 KB, patch)
2025-07-18 10:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings (11.47 KB, patch)
2025-07-18 12:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 40444: Add Test::NoWarnings to xt tests (9.13 KB, patch)
2025-07-18 12:15 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2025-07-18 09:57:29 UTC
Once all children bug reports of bug 25515 will be pushed, only 7 (non-tribial) tests will be left.

We should add a test now to ensure no new occurrence will be added.
Comment 1 Jonathan Druart 2025-07-18 10:01:56 UTC
Created attachment 184319 [details] [review]
Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings

This patch adds a new xt test (xt/use-test-no-warnings.t) to make sure
all our Perl test files will use Test::NoWarnings.

It also adds Test::NoWarnings to some files that were missing it and
that didn't need any other changes.

However we still have 7 non-trivial tests that we will consider
exception for now, until they are fixed.

Test plan:
  prove xt/use-test-no-warnings.t
should return green.
And all other tests modified by this patch (the qa script will do that
for you)

You can also test the 2 selenium tests:
1. DROP and CREATE the DB
  DROP DATABASE koha_kohadev;
  CREATE DATABASE koha_kohadev;
  restart_all
2. KOHA_TESTING=1 prove t/db_dependent/selenium/00-onboarding.t
3. Repeat 1
2. KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t
Comment 2 Jonathan Druart 2025-07-18 12:15:27 UTC
Created attachment 184364 [details] [review]
Bug 40444: Add a test to ensure all Perl test files use Test::NoWarnings

This patch adds a new xt test (xt/use-test-no-warnings.t) to make sure
all our Perl test files will use Test::NoWarnings.

It also adds Test::NoWarnings to some files that were missing it and
that didn't need any other changes.

However we still have 7 non-trivial tests that we will consider
exception for now, until they are fixed.

Test plan:
  prove xt/use-test-no-warnings.t
should return green.
And all other tests modified by this patch (the qa script will do that
for you)

You can also test the 2 selenium tests:
1. DROP and CREATE the DB
  DROP DATABASE koha_kohadev;
  CREATE DATABASE koha_kohadev;
  restart_all
2. KOHA_TESTING=1 prove t/db_dependent/selenium/00-onboarding.t
3. Repeat 1
2. KOHA_TESTING=1 prove t/db_dependent/selenium/01-installation.t
Comment 3 Jonathan Druart 2025-07-18 12:15:29 UTC
Created attachment 184365 [details] [review]
Bug 40444: Add Test::NoWarnings to xt tests