Browse Source

dox on automated testing (#3093)

Signed-off-by: Alex Meijer <alexander.meijer@ibm.com>
Signed-off-by: Alex Meijer <ameijer@users.noreply.github.com>
Co-authored-by: Thomas Nguyen <thomasvn.dev@gmail.com>
Alex Meijer 1 năm trước cách đây
mục cha
commit
3a2e07ff14
2 tập tin đã thay đổi với 15 bổ sung0 xóa
  1. 15 0
      docs/testing/AUTOMATED_TESTING.md
  2. BIN
      docs/testing/OC Test Arch.png

+ 15 - 0
docs/testing/AUTOMATED_TESTING.md

@@ -0,0 +1,15 @@
+# Automated Testing in OpenCost
+
+This document governs OpenCost's approach to automated testing. OpenCost has two main components of automated testing, Integration Tests and Unit Tests.
+
+Unit Tests are designed to test small pieces of code. They make extensive use of mocks and other synthetic items. These tests are designed to be run quickly and easily on developers' machines. 
+
+Integration Tests are designed to test the functionality of groups of units of code working together. These are typically more complex tests that require more setup than usual. In the context of OpenCost, this means typically we are querying against a real Prometheus with real data. 
+
+## OpenCost Automation Pipeline
+
+OpenCost will execute its unit and integration tests in accordance with the following pipeline architecture:
+
+![OpenCost Test Architecture](OC%20Test%20Arch.png)
+
+The tests will execute on contributed code at different stages in the pipeline depending on whether or not the contributor of the code is a maintainer or is a third party. If the contributor is a third party, the Integration Tests will not be executed on the code until it is in the merge queue, so that unreviewed/unapproved code will not be able to execute tests or access integration test clusters. 

BIN
docs/testing/OC Test Arch.png