Skip to content

test: add an integration test suite for version-16 - #443

Open
av-dev2 wants to merge 74 commits into
Aakvatech-Limited:version-16-hotfixfrom
av-dev2:test/v16-integration-suite
Open

test: add an integration test suite for version-16#443
av-dev2 wants to merge 74 commits into
Aakvatech-Limited:version-16-hotfixfrom
av-dev2:test/v16-integration-suite

Conversation

@av-dev2

@av-dev2 av-dev2 commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Adds an integration test suite for csf_tz on version-16. Each commit covers one file.

What is here

The app had 41 test files, 38 of them empty unittest.TestCase stubs: 15 executable tests, of which 5 passed. This branch brings it to 84 test files and 631 test cases, all passing on a Frappe 16 / ERPNext 16 / HRMS 16 site.

Written against the v16 testing API the migration guide requires — frappe.tests.IntegrationTestCase / UnitTestCase, EXTRA_TEST_RECORD_DEPENDENCIES, super().setUpClass() — replacing the deprecated FrappeTestCase. The empty stubs are deleted rather than left behind.

Coverage by domain: custom_api (61), payroll and HR hooks (75), payments and imports (85), VFD and fiscal (110), integrations, geography and patches (140), stock and sales (72), reports (68), plus two suites that check the app as a whole:

  • test_v16_integrity.py — asserts that every hook path, module, DocType, controller class, whitelisted method, report, page, patch, custom field, property setter and workspace link resolves on v16 (858 checks).
  • test_client_script_refs.py — asserts every server method named in a Desk client script exists and is whitelisted.

Every outbound call is mocked: TRA/VFD, Simplify, Total, VFDPlus, Stanbic SFTP and PGP, KCB, Selcom, LATRA, TIRA and the vehicle authority. No test reaches the network.

Measured coverage: 85.9% of functions (703/818) and 79.2% of statements.

Running them

Tests are not wired into CI, by design — the Frappe runner is slow on GitHub Actions. Run them on a bench against a dedicated test site:

bench --site <name>-test.localhost run-tests --app csf_tz --coverage

Review order

The suite asserts the corrected behaviour, so it is green only once the companion fixes are in. If it is merged first, expect failures that the other pull requests resolve.

av-dev2 added 30 commits August 26, 2026 11:55
av-dev2 added 29 commits August 26, 2026 11:58
av-dev2 added a commit to av-dev2/csf_tz that referenced this pull request Aug 30, 2026
test: add an integration test suite for version-16- Aakvatech-Limited#443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant