Skip to content

Separate unit and integration tests #12

Open
@hansenmc

Description

@hansenmc

The current set of tests function mostly as integration tests that require a live instance of MarkLogic, and take ~15 minutes to run.

  • Unit tests should run quickly, and not rely on external systems.
  • Mock objects should be used in place of a live database for unite tests, or the test should be moved into an integration test suite.

It would be helpful, and make it easier for contributors, if the tests and build were organized to facilitate separate execution of unit tests and integration tests. This would also make it easier to integrate with CI services, such as Travis CI and/or Circle CI without having to exclude the test phase.

Activity

jxchen-us

jxchen-us commented on Aug 9, 2016

@jxchen-us
Contributor

Given the definition above, all of our "unit tests" are "integration tests". The tests that are included in this repository is less than 5% of all the functional tests we run nightly. We are in the process of migrating more mlcp functional tests here. Or we could call the tests available here "sanity tests".

hansenmc

hansenmc commented on Aug 9, 2016

@hansenmc
Author

There are a lot of lines of code and functionality that could/should be covered and verified in unit tests. Having a suite of unit tests that provide code coverage, and that can be run quickly/easily would make it easier for users to contribute changes and have some level of confidence that they have not broken anything, or changed expected behaviors. Plus, it helps highlight/focus where the problem might be when it does fail.

We should have both, but having them more cleanly separated and integrated into the build would make it much easier to control whether to execute one and/or the other.

added a commit that references this issue on Aug 10, 2016

resolve marklogic#12 separate unit and integration tests

9bc48f6
self-assigned this
on Oct 30, 2016
added this to the N/A milestone on Oct 30, 2016
modified the milestones: N/A, 10.0.2 on Mar 22, 2019
modified the milestones: 10.0.2, 10.0.3 on Aug 24, 2019
modified the milestones: 10.0.3, 11.0.1 on Sep 18, 2019
modified the milestones: 11.1.0, 11.2.0 on Apr 15, 2024
modified the milestones: 11.3.0, 11.4.0 on Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @hansenmc@mattsunsjf@jxchen-us@abika5@yunzvanessa

      Issue actions

        Separate unit and integration tests · Issue #12 · marklogic/marklogic-contentpump