io.github.ducthienbui97:mongodb-integration

Query integrity check for MongoDB

License

License

Categories

Categories

MongoDB Data Databases
GroupId

GroupId

io.github.ducthienbui97
ArtifactId

ArtifactId

mongodb-integration
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

io.github.ducthienbui97:mongodb-integration
Query integrity check for MongoDB

Download mongodb-integration

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.ducthienbui97/mongodb-integration/ -->
<dependency>
    <groupId>io.github.ducthienbui97</groupId>
    <artifactId>mongodb-integration</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.ducthienbui97/mongodb-integration/
implementation 'io.github.ducthienbui97:mongodb-integration:1.0'
// https://jarcasting.com/artifacts/io.github.ducthienbui97/mongodb-integration/
implementation ("io.github.ducthienbui97:mongodb-integration:1.0")
'io.github.ducthienbui97:mongodb-integration:jar:1.0'
<dependency org="io.github.ducthienbui97" name="mongodb-integration" rev="1.0">
  <artifact name="mongodb-integration" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.ducthienbui97', module='mongodb-integration', version='1.0')
)
libraryDependencies += "io.github.ducthienbui97" % "mongodb-integration" % "1.0"
[io.github.ducthienbui97/mongodb-integration "1.0"]

Dependencies

compile (7)

Group / Artifact Type Version
io.github.ducthienbui97 : query-integrity-core jar 1.0
com.fasterxml.jackson.core : jackson-databind jar 2.10.2
info.picocli : picocli jar 4.3.2
org.mongodb : mongodb-driver-sync jar 3.12.4
com.google.guava : guava jar 29.0-jre
org.slf4j : slf4j-api jar 1.7.30
ch.qos.logback : logback-classic jar 1.2.3

provided (1)

Group / Artifact Type Version
org.projectlombok : lombok jar 1.18.12

test (6)

Group / Artifact Type Version
de.bwaldvogel : mongo-java-server jar 1.29.0
org.junit.jupiter : junit-jupiter-engine jar 5.6.2
org.junit.jupiter : junit-jupiter-params jar 5.6.2
org.hamcrest : hamcrest jar 2.2
org.mockito : mockito-core jar 3.3.3
org.mockito : mockito-junit-jupiter jar 3.3.3

Project Modules

There are no modules declared in this project.

Query Integrity

Query Integrity is framework to create and run tests on software using Metamorphic Testing. The main purpose of the tool is to automatically test and find inconsistency of data query result in order to find bugs and problems in data retrieving related features of software.

This library is originally developed for CSIT314's group assessment at University of Wollongong

The idea

In any data retrieving system, the relation between the result of any 2 queries should be logically corrected (e.g. A search for "A" should not return any result from a search for "not A"). These relations are metamorphic relations. Failing to produce a correct relation between some pair of queries can be a result of:

  • A bug
  • A technical limitation
  • A shortcoming of system design
  • ...

These problems might not appear in development or even in testing due to small size of test data, deterministic natural of manually created tests. We only test what we know can go wrong, but the bugs are normally found where we did not know that can go wrong.

A simple solution for that is to automatically generate multiple pairs of queries that we know what relation of their results should be. Hundreds or thousands of queries can be sent and validate without the creator know what query it is or what is the supposed answer for that query.

The tests

This project currently supports 3 kinds of metamorphic relations that are common among data retrieving systems:

The not test

A query search for A should not return any result in the query search for not A.

The subset test

  • A query search for A should return all the result in the query search for A and B.
  • A query search for A or B should return all the result in the query search for A.

The equal test

  • A query search for A should return the same result as a query search for B if A and B are logically equivalent (e.g. A and not not A, A and B and B and A, ...)

The project

This project provide following modules:

  • query-integrity-core provides testing service as well as interfaces to generate queries that fit your system as well as a validator for the results.

  • mongodb-integration provides an implementation to test mongodb server.

Versions

Version
1.0