Skip to content
This repository has been archived by the owner on Jan 27, 2023. It is now read-only.

New Testing Setup documentation #1283

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions TESTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Running Anchore Engine Tests
Anchore Engine is covered by automated Unit, Integration, and Functional Tests.
Each type can be run locally using the following steps.

All require a local checkout of Anchore Engine. Ensure steps are executed from repository root.

## Running Unit Tests
###Set Up
* \<Some Set Up Steps>
<br>

###Run Tests
* From PyCharm:
* Select 'Run PyTest' for test script to run
* From Terminal:
* `make test-unit`

## Running Integration Tests

###Set Up
* \<Some Set Up Steps>
<br>

###Run Tests
* From PyCharm:
* Select 'Run PyTest' for test script to run
* From Container:
* `sh setup_deps.sh`
<br>

###Clean Up
* If ran from container
* `teardown_deps`

## Running Functional Tests
###Set Up
* `source ./tests/functional/local.env`
* `sh ./scripts/ci/prep-local-docker-registry-credentials`
* `make compose-up`
<br>

###Run Tests
* From PyCharm:
* Select 'Run PyTest' for test script to run
* From Container:
* `docker exec -it ci_job-runner_1 /bin/bash`
* `pytest tests/functional/.../some_test.py`
<br>

###Clean Up
*:q