blackboxlib

module
v0.0.0-...-ed5509b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: AGPL-3.0

README

blackboxlib

builds.sr.ht status

dbmigrate is of beta quality and may have it APIs or functionality changed without notice.

Blackboxlib is a Golang library used to facilitate blackbox testing. Blackbox testing involves configuring and running a blocking process, such as server, issuing mutative commands to the process and verifying the mutations correctly changed the process's state. Normally all blackbox operations are done via valid public interactions and does not make use of information that a user of the process would not have access to.

General Examples of Blackbox Testing
  1. Start a microservice and execute tests that use its API.
  2. Execute a CLI utility and examine the state it leaves behind (e.g. filesystem, file contents)
  3. Start a micro service and use emulation to simulate mouse actions and keyboard activity. ~blackboxlib` does not address this kind of blackbox testing (also known at end-to-end testing).

A key aspect of blackbox testing is that the tests do not use insider knowledge of the system it is testing. In some cases insider knowledge may be required for some tests would otherwise become complicated or slow, such as creating some failure states that would otherwise become impractical. For example, testing what happens when a system looses access to its data storage (e.g. database). Rather than actually causing a condition where the data storage system stops responding, the blackbox test system can know to configure the service to use a data storage system that is guaranteed to have specific problems. Avoid making special interfaces only used by tests.

Usage

The best way to understand how use the various offerings of blackboxlib is with the tests.

License

This software is licensed under the AGPL for noncommercial use. Commercial use is only possible through a separate licensing agreement. Non-perpetual commercial licenses are possible with significant maintainable contributions.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL