Skip to content

Improve setup for backend e2e tests #4554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 17 commits into from
Jul 14, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export VIRTUAL_ENV=".venv"
layout python3
2 changes: 1 addition & 1 deletion .github/workflows/system-tests-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install requests
python3 -m pip install -r requirements.txt

- name: Set up Java
uses: actions/setup-java@v4
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,7 @@ distributions/
*.vscode/
sentry-spring-boot-starter-jakarta/src/main/resources/META-INF/spring.factories
sentry-samples/sentry-samples-spring-boot-jakarta/spy.log
sentry-mock-server.txt
spring-server.txt
spy.log
.kotlin
17 changes: 12 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all clean compile javadocs dryRelease update checkFormat api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical check preMerge publish systemtest systemtest-interactive
.PHONY: all clean compile javadocs dryRelease update checkFormat api assembleBenchmarkTestRelease assembleUiTestRelease assembleUiTestCriticalRelease createCoverageReports runUiTestCritical setupPython systemTest systemTestInteractive check preMerge publish

all: stop clean javadocs compile createCoverageReports
assembleBenchmarks: assembleBenchmarkTestRelease
Expand All @@ -10,6 +10,7 @@ publish: clean dryRelease
clean:
./gradlew clean --no-configuration-cache
rm -rf distributions
rm -rf .venv

# build and run tests
compile:
Expand Down Expand Up @@ -59,13 +60,19 @@ createCoverageReports:
./gradlew jacocoTestReport
./gradlew koverXmlReportRelease

# Create the Python virtual environment for system tests, and install the necessary dependencies
setupPython:
@test -d .venv || python3 -m venv .venv
.venv/bin/pip install --upgrade pip
.venv/bin/pip install -r requirements.txt

# Run system tests for sample applications
systemtest:
python3 test/system-test-runner.py test --all
systemTest: setupPython
.venv/bin/python test/system-test-runner.py test --all

# Run system tests with interactive module selection
systemtest-interactive:
python3 test/system-test-runner.py test --interactive
systemTestInteractive: setupPython
.venv/bin/python test/system-test-runner.py test --interactive

# Run tests and lint
check:
Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
certifi==2025.7.14
charset-normalizer==3.4.2
idna==3.10
requests==2.32.4
urllib3==2.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ public static void main(String[] args) throws InterruptedException {
// Enable SDK logging with Debug level
options.setDebug(true);
// To change the verbosity, use:
// By default it's DEBUG.
// options.setDiagnosticLevel(SentryLevel.ERROR);
// By default it's DEBUG.
// A good option to have SDK debug log in prod is to use only level ERROR here.

// Exclude frames from some packages from being "inApp" so are hidden by default in Sentry
Expand All @@ -82,16 +82,15 @@ public static void main(String[] args) throws InterruptedException {
options.setTracesSampleRate(1.0); // set 0.5 to send 50% of traces

// Determine traces sample rate based on the sampling context
// options.setTracesSampler(
// context -> {
// // only 10% of transactions with "/product" prefix will be collected
// if (!context.getTransactionContext().getName().startsWith("/products"))
// {
// return 0.1;
// } else {
// return 0.5;
// }
// });
// options.setTracesSampler(
// context -> {
// // only 10% of transactions with "/product" prefix will be collected
// if (!context.getTransactionContext().getName().startsWith("/products")) {
// return 0.1;
// } else {
// return 0.5;
// }
// });
});

Sentry.addBreadcrumb(
Expand Down
Loading
Loading