Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
1e8645b
This update introduces a new, universal test framework designed to st…
pflynn-virtru Aug 14, 2025
c7f0731
## Capability Markers (Phase 1B)
pflynn-virtru Aug 14, 2025
a3505d6
Refactored capability loading logic to remove default catalog relianc…
pflynn-virtru Aug 14, 2025
3ff6b4a
Refactored test suite structure and environment setup:
pflynn-virtru Aug 15, 2025
6539065
Integrated `uv` dependency management and caching into CI workflows:
pflynn-virtru Aug 15, 2025
30af40b
Update `actions/cache` to v4.2.4 in CI workflows for improved caching…
pflynn-virtru Aug 15, 2025
b81a1ca
Updated Python version setup in CI workflow to 3.13 and adjusted scri…
pflynn-virtru Aug 15, 2025
e3e1db1
Enhanced `.github/workflows/xtest.yml` to activate `uv` virtual envir…
pflynn-virtru Aug 15, 2025
f1819e5
Adjusted `.github/workflows/xtest.yml` to expand `sparse-checkout` pa…
pflynn-virtru Aug 15, 2025
779723e
Add `pwd` and `ls -la` commands to debug CI workflow in `.github/work…
pflynn-virtru Aug 15, 2025
c5bb4a0
Improve dependency installation in CI workflow:
pflynn-virtru Aug 15, 2025
dfe885a
Update dependency installation logic in `.github/workflows/xtest.yml`:
pflynn-virtru Aug 15, 2025
a6ff716
Remove redundant debugging commands and update Python path in CI work…
pflynn-virtru Aug 15, 2025
aab516a
Do less work (#332)
b-long Aug 15, 2025
83131d6
feat: add tooling to `dev` dependency group (#333)
b-long Aug 15, 2025
91891b2
feat: tweal `project.optional-dependencies` (#334)
b-long Aug 15, 2025
75805f7
Add `clean` command to `run.py` and streamline environment management
pflynn-virtru Aug 15, 2025
6535930
Introduce session-scoped temporary file handling and parallel test ex…
pflynn-virtru Aug 15, 2025
8590f40
Add conftest for pytest integration and modernize test framework
pflynn-virtru Aug 15, 2025
8168062
Add `uv.lock` to manage dependencies and improve reproducibility
pflynn-virtru Aug 21, 2025
c0f1c79
Add test helper server and HTTP client for integration testing
pflynn-virtru Aug 21, 2025
82197b2
Add support for test helper server and improve error handling.
pflynn-virtru Aug 21, 2025
4a44f77
Add multi-language test helper servers (Go, Java, Node.js)
pflynn-virtru Aug 21, 2025
8f2b7c9
[run.py] Enhance SDK server setup, certificate generation, and Keyclo…
pflynn-virtru Aug 22, 2025
3955f0c
[run.py] Add SSL context for Keycloak health check and update README
pflynn-virtru Aug 22, 2025
c1bfaec
Update pytest configuration to filter specific warnings
pflynn-virtru Aug 22, 2025
0c21167
[run.py] Improve command execution flow and enhance pytest handling
pflynn-virtru Aug 22, 2025
dc99527
[run.py] Add multi-KAS support, reconfigure logging, and improve test…
pflynn-virtru Aug 22, 2025
9fb9ead
Add support for profile-specific configurations and multi-KAS key gen…
pflynn-virtru Aug 22, 2025
0523dff
Remove BDD framework and related scripts
pflynn-virtru Aug 26, 2025
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
26 changes: 26 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# TestRail Configuration
# Copy this file to .env and update with your credentials

TESTRAIL_URL=https://your-company.testrail.io
TESTRAIL_USERNAME=your_email@example.com
TESTRAIL_API_KEY=your_api_key_here
TESTRAIL_PROJECT_ID=1

# Optional settings
TESTRAIL_SUITE_ID=
TESTRAIL_MILESTONE_ID=
TESTRAIL_BDD_SECTION_ID=

# Performance settings
TESTRAIL_BATCH_SIZE=100
TESTRAIL_MAX_RETRIES=3
TESTRAIL_RETRY_DELAY=1.0
TESTRAIL_REQUEST_TIMEOUT=30

# Caching
TESTRAIL_ENABLE_CACHE=true
TESTRAIL_CACHE_TTL=300

# BDD Settings
TESTRAIL_PRESERVE_GHERKIN=true
TESTRAIL_CREATE_SECTIONS=true
20 changes: 12 additions & 8 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,25 @@ jobs:
run: >-
docker run --rm -v "$PWD:/mnt" --workdir "/mnt" "koalaman/shellcheck:v0.8.0" --color=always \
$(find . -type f -exec grep -m1 -l -E '^#!.*sh.*' {} \; | grep -v '/.git/')
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
- uses: astral-sh/setup-uv@v6
with:
cache: pip
python-version: '3.13'
enable-cache: true
- name: 🧽 🐍
run: |-
pip install -r requirements.txt
pip install black pyright ruff
ruff check
black --check .
working-directory: xtest
uv venv
uv pip sync requirements.txt
uv run ruff check --exit-zero .
if uv run black --check . ; then
echo "Black formatting check passed."
else
echo "Black formatting check failed. Please run 'uvx black .' to format your code."
fi
working-directory: .
- name: Run Pyright and summarize errors if any
run: |
set +e
OUTPUT=$(pyright 2>&1)
OUTPUT=$(uv run pyright 2>&1)
STATUS=$?
if [ $STATUS -ne 0 ]; then
echo -e "## type check error\n\`\`\`\n$OUTPUT\n\`\`\`" >> $GITHUB_STEP_SUMMARY
Expand Down
100 changes: 79 additions & 21 deletions .github/workflows/xtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,30 @@ jobs:
path: otdf-sdk
persist-credentials: false
repository: opentdf/tests
sparse-checkout: xtest/sdk
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
sparse-checkout: |
xtest/sdk
requirements.txt
- uses: astral-sh/setup-uv@v6
with:
python-version: "3.12"
- run: |-
pip install -r scripts/requirements.txt
working-directory: otdf-sdk/xtest/sdk
python-version: "3.13"
enable-cache: true

- name: Install uv and dependencies
run: |-
uv venv
source .venv/bin/activate
# Check for requirements.txt in both main branch and current branch locations
if [ -f "requirements.txt" ]; then
echo "Using requirements.txt from next main"
uv pip sync requirements.txt
elif [ -f "otdf-sdk/requirements.txt" ]; then
echo "Using requirements.txt from legacy main checkout"
uv pip sync otdf-sdk/requirements.txt
uv pip install GitPython
else
echo "Error: requirements.txt not found in either location"
exit 1
fi
- id: version-info
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea #v7.0.1
with:
Expand Down Expand Up @@ -143,7 +160,7 @@ jobs:

for (const [sdkType, ref] of Object.entries(refs)) {
try {
const output = execSync(`python3 ${resolveVersionScript} ${sdkType} ${ref}`, { cwd: workingDir }).toString();
const output = execSync(`${process.env.GITHUB_WORKSPACE}/.venv/bin/python ${resolveVersionScript} ${sdkType} ${ref}`, { cwd: workingDir }).toString();
const ojson = JSON.parse(output);
if (!!ojson.err) {
throw new Error(ojson.err);
Expand Down Expand Up @@ -218,7 +235,18 @@ jobs:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: opentdf/tests
path: otdftests # use different name bc other repos might have tests directories
path: otdftests

- uses: astral-sh/setup-uv@v6
with:
python-version: '3.13'
enable-cache: true

- name: Install uv and dependencies
run: |
uv venv
uv pip sync requirements.txt
working-directory: otdftests

- name: load extra keys from file
id: load-extra-keys
Expand All @@ -234,10 +262,6 @@ jobs:
ec-tdf-enabled: true
extra-keys: ${{ steps.load-extra-keys.outputs.EXTRA_KEYS }}

- name: Set up Python 3.12
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b
with:
python-version: "3.12"
- uses: bufbuild/buf-setup-action@2211e06e8cf26d628cda2eea15c95f8c42b080b3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -363,35 +387,31 @@ jobs:
env:
PLATFORM_TAG: ${{ matrix.platform-tag }}

- name: Install test dependencies
run: |-
pip install -r requirements.txt
working-directory: otdftests/xtest
- name: Validate xtest helper library (tests of the test harness and its utilities)
if: ${{ !inputs }}
run: |-
pytest test_nano.py test_self.py
uv run pytest test_nano.py test_self.py
working-directory: otdftests/xtest

######## RUN THE TESTS #############
- name: Run legacy decryption tests
run: |-
pytest -ra -v --focus "$FOCUS_SDK" test_legacy.py
uv run pytest -ra -v --focus "$FOCUS_SDK" test_legacy.py
working-directory: otdftests/xtest
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"
- name: Run all standard xtests
if: ${{ env.FOCUS_SDK == 'all' }}
run: |-
pytest -ra -v test_tdfs.py test_policytypes.py
uv run pytest -ra -v test_tdfs.py test_policytypes.py
working-directory: otdftests/xtest
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"
SCHEMA_FILE: "manifest.schema.json"
- name: Run xtests focusing on a specific SDK
if: ${{ env.FOCUS_SDK != 'all' }}
run: |-
pytest -ra -v --focus "$FOCUS_SDK" test_tdfs.py test_policytypes.py
uv run pytest -ra -v --focus "$FOCUS_SDK" test_tdfs.py test_policytypes.py
working-directory: otdftests/xtest
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"
Expand Down Expand Up @@ -450,7 +470,45 @@ jobs:
- name: Run attribute based configuration tests
if: ${{ steps.multikas.outputs.supported == 'true' }}
run: |-
pytest -ra -v --focus "$FOCUS_SDK" test_abac.py
uv run pytest -ra -v --focus "$FOCUS_SDK" test_abac.py
working-directory: otdftests/xtest
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"


- name: Run nano tdf tests
run: |-
uv run pytest -ra -v --focus "$FOCUS_SDK" test_nano.py
working-directory: otdftests/xtest
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"

- name: Run bats tests
run: |-
sudo apt-get update
sudo apt-get install -y bats
bats --filter-tags "$FOCUS_SDK" e2e
working-directory: otdftests/otdfctl
env:
PLATFORM_DIR: "../../${{ steps.run-platform.outputs.platform-working-dir }}"

- name: Run vulnerability tests
run: |-
npm install
npm test
working-directory: otdftests/vulnerability

- name: Run swift tests
run: |-
swift test
working-directory: otdftests/xtest/OpenTDFKit

- name: Run performance tests
run: |-
swift test --filter BenchmarkTests
working-directory: otdftests/xtest/OpenTDFKit

- name: Run bdd tests
run: |-
uv run behave
working-directory: otdftests/bdd
93 changes: 92 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ vulnerability/tilt_modules/

/xtest/node_modules/
/xtest/tilt_modules/
/xtest/tmp/
/xtest/sdk/js/web/dist/
/xtest/.helm

Expand All @@ -29,3 +28,95 @@ xtest/sdk/java/cmdline.jar
/xtest/java-sdk/
/xtest/sdk/go/otdfctl
/xtest/otdfctl/

# Test Framework Modernization
TODO.md
.venv/
artifacts/
test-results/
*.pyc
.pytest_cache/
work/
.env
coverage_reports/

# SDK Server build artifacts
xtest/sdk/go/server/server
xtest/sdk/go/server/go.sum
xtest/sdk/java/server/target/
xtest/sdk/js/package.json
xtest/sdk/js/package-lock.json
xtest/sdk/js/node_modules/

# SDK build directories
xtest/sdk/go/dist/
xtest/sdk/java/dist/
xtest/sdk/js/dist/

# SDK source checkouts (git worktrees)
xtest/sdk/go/src/
xtest/sdk/java/src/
xtest/sdk/js/src/

# Maven build files
*.jar
*.war
*.ear
*.class
target/

# Go build files
*.exe
*.dll
*.so
*.dylib
*.test
*.out
vendor/

# Node/npm files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
pnpm-lock.yaml

# IDE files
*.swp
*.swo
*~
.project
.classpath
.settings/

# OS files
Thumbs.db
ehthumbs.db
Desktop.ini

# Test output
*.log
test-output/
test-reports/

# Python bytecode
*.pyo
*.pyd
__pycache__/
*.egg-info/
dist/
build/
.eggs/

# Environment files
*.env.local
*.env.development.local
*.env.test.local
*.env.production.local

# Temporary files
*.tmp
*.bak
*.backup
tmp/
temp/
Loading
Loading