Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QEP 42: Compulsory Unit Tests for Core Changes #42

Open
NathanW2 opened this issue Oct 28, 2015 · 2 comments
Open

QEP 42: Compulsory Unit Tests for Core Changes #42

NathanW2 opened this issue Oct 28, 2015 · 2 comments
Assignees
Labels
Final Draft Type/QA Quality assurance related

Comments

@NathanW2
Copy link
Member

NathanW2 commented Oct 28, 2015

QGIS Enhancement 42: Compulsory Unit Tests for Core Changes

Date 2014/10/05
Author Nyall Dawson
Contact [email protected]
Last Edited 2014/10/05
Status Draft
Version QGIS 2.7+

Summary

This proposal is aimed at providing more stable releases and preventing regressions in QGIS releases by expanding
the coverage of unit tests and adopting a hard line approach to compulsory unit tests.

Background

The QGIS coding guidelines (ref) state that since "November 2007 we require all new features going into master to be
accompanied with a unit test" (https://github.com/qgis/QGIS/blob/master/CODING#L738). However, this requirement is not
being enforced and the vast majority of core changes are not accompanied by unit tests. Lack of unit tests impact
on our ability to deliver stable, regression free releases and potentially harms our reputation as an enterprise-ready GIS.

Proposed Solution

From QGIS >=2.7, all commits which modify code in "core" are required to be accompanied by sufficient unit tests to ensure
that they will not suffer regressions in future QGIS releases. Commits which are not accompanied by unit tests will not be accepted
into master. Code changes for GUI and app are immune from this requirement due to the complexity in writing interactive
tests suites.

Exemption for specific commits may be granted, but only after discussion on the QGIS developer list.

Generally, unit tests in either c++ or python are acceptable (or both). However, methods which involve transfer of ownership
of objects must include python tests to ensure that this transfer is handled correctly.

To enforece this requirement, commits which modify core and which are not accompanied by unit tests (or have been granted
exemption via the Dev list) will be reverted. Pull requests without sufficient unit tests will not be considered for merging.

Implementation Details

If accepted, the existing requirement for unit tests in the CODING file will be updated to reflect the new requirements. The
new requirements will be advertised to existing developers via an announcement on the QGIS-Dev mailing list.

Voting History

(required)

@NathanW2 NathanW2 changed the title QGIS Enhancement #: Compulsory Unit Tests for Core Changes QEP #: Compulsory Unit Tests for Core Changes Oct 28, 2015
@NathanW2 NathanW2 changed the title QEP #: Compulsory Unit Tests for Core Changes QEP 24: Compulsory Unit Tests for Core Changes Nov 2, 2015
@andreasneumann
Copy link
Member

QGIS 3.x would be a good timing for implementing this.

@timlinux
Copy link
Member

Big +1 from me on this

@NathanW2 NathanW2 changed the title QEP 24: Compulsory Unit Tests for Core Changes QEP 42: Compulsory Unit Tests for Core Changes Jan 29, 2017
@strk strk added the Type/QA Quality assurance related label Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Final Draft Type/QA Quality assurance related
Projects
None yet
Development

No branches or pull requests

5 participants