Skip to content
Open
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

### 1.0.3-dev

* `lobster-codebeamer`:
- Enabled parallel execution for system tests, improving test suite performance.

* All tools now automatically create output directories if they don't exist.
Previously, tools would crash with an exception if the specified output
directory path did not exist. This enhancement improves usability and
Expand Down
15 changes: 12 additions & 3 deletions tests_system/asserter.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,16 @@ def assertInStdErr(self, expected_substring: str,
)
)

def apply_replacements(self, content: str) -> str:
"""
Apply placeholder replacements to expected file content.
Override this method in subclasses to add custom replacements.
"""
return content.replace(
"CURRENT_WORKING_DIRECTORY",
str(self._test_runner.working_dir),
)

def assertOutputFiles(self):
"""For each expected file, checks if an actual file has been created with the
expected content
Expand Down Expand Up @@ -101,9 +111,8 @@ def assertOutputFiles(self):
modified_actual = actual_file.read().replace("\\\\", "/")

# lobster-trace: system_test.CWD_Placeholder
modified_expected = expected_file.read().replace(
"CURRENT_WORKING_DIRECTORY",
str(self._test_runner.working_dir),
modified_expected = self.apply_replacements(
expected_file.read()
)
modified_actual_json = is_valid_json(modified_actual)
modified_expected_json = is_valid_json(modified_expected)
Expand Down
3 changes: 0 additions & 3 deletions tests_system/lobster_codebeamer/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ py_library(
py_test(
name = "test_extract_requirements",
srcs = ["test_extract_requirements.py"],
tags = ["exclusive"],
deps = [
":lobster_codebeamer",
requirement("flask"),
Expand All @@ -53,7 +52,6 @@ py_test(
py_test(
name = "test_lobster_codebeamer",
srcs = ["test_lobster_codebeamer.py"],
tags = ["exclusive"],
deps = [
":lobster_codebeamer",
"//tests_system",
Expand All @@ -64,7 +62,6 @@ py_test(
py_test(
name = "test_valid_flow",
srcs = ["test_valid_flow.py"],
tags = ["exclusive"],
deps = [
":lobster_codebeamer",
requirement("flask"),
Expand Down
20 changes: 10 additions & 10 deletions tests_system/lobster_codebeamer/data/10_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand All @@ -24,7 +24,7 @@
"tag": "req 2@200",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 20000,
"item": 2,
"version": 200,
Expand All @@ -44,7 +44,7 @@
"tag": "req 3@300",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 30000,
"item": 3,
"version": 300,
Expand All @@ -64,7 +64,7 @@
"tag": "req 4@400",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 40000,
"item": 4,
"version": 400,
Expand All @@ -84,7 +84,7 @@
"tag": "req 5@500",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 50000,
"item": 5,
"version": 500,
Expand All @@ -104,7 +104,7 @@
"tag": "req 6@600",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 60000,
"item": 6,
"version": 600,
Expand All @@ -124,7 +124,7 @@
"tag": "req 7@700",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 70000,
"item": 7,
"version": 700,
Expand All @@ -144,7 +144,7 @@
"tag": "req 8@800",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 80000,
"item": 8,
"version": 800,
Expand All @@ -164,7 +164,7 @@
"tag": "req 9@900",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 90000,
"item": 9,
"version": 900,
Expand All @@ -184,7 +184,7 @@
"tag": "req 10@1000",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 100000,
"item": 10,
"version": 1000,
Expand Down
22 changes: 11 additions & 11 deletions tests_system/lobster_codebeamer/data/11_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand All @@ -24,7 +24,7 @@
"tag": "req 2@200",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 20000,
"item": 2,
"version": 200,
Expand All @@ -44,7 +44,7 @@
"tag": "req 3@300",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 30000,
"item": 3,
"version": 300,
Expand All @@ -64,7 +64,7 @@
"tag": "req 4@400",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 40000,
"item": 4,
"version": 400,
Expand All @@ -84,7 +84,7 @@
"tag": "req 5@500",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 50000,
"item": 5,
"version": 500,
Expand All @@ -104,7 +104,7 @@
"tag": "req 6@600",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 60000,
"item": 6,
"version": 600,
Expand All @@ -124,7 +124,7 @@
"tag": "req 7@700",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 70000,
"item": 7,
"version": 700,
Expand All @@ -144,7 +144,7 @@
"tag": "req 8@800",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 80000,
"item": 8,
"version": 800,
Expand All @@ -164,7 +164,7 @@
"tag": "req 9@900",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 90000,
"item": 9,
"version": 900,
Expand All @@ -184,7 +184,7 @@
"tag": "req 10@1000",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 100000,
"item": 10,
"version": 1000,
Expand All @@ -204,7 +204,7 @@
"tag": "req 11@1100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 110000,
"item": 11,
"version": 1100,
Expand Down
2 changes: 1 addition & 1 deletion tests_system/lobster_codebeamer/data/1_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand Down
8 changes: 4 additions & 4 deletions tests_system/lobster_codebeamer/data/4_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand All @@ -24,7 +24,7 @@
"tag": "req 2@200",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 20000,
"item": 2,
"version": 200,
Expand All @@ -44,7 +44,7 @@
"tag": "req 3@300",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 30000,
"item": 3,
"version": 300,
Expand All @@ -64,7 +64,7 @@
"tag": "req 4@400",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 40000,
"item": 4,
"version": 400,
Expand Down
10 changes: 5 additions & 5 deletions tests_system/lobster_codebeamer/data/5_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand All @@ -24,7 +24,7 @@
"tag": "req 2@200",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 20000,
"item": 2,
"version": 200,
Expand All @@ -44,7 +44,7 @@
"tag": "req 3@300",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 30000,
"item": 3,
"version": 300,
Expand All @@ -64,7 +64,7 @@
"tag": "req 4@400",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 40000,
"item": 4,
"version": 400,
Expand All @@ -84,7 +84,7 @@
"tag": "req 5@500",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 50000,
"item": 5,
"version": 500,
Expand Down
12 changes: 6 additions & 6 deletions tests_system/lobster_codebeamer/data/6_items.lobster
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"tag": "req 1@100",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 10000,
"item": 1,
"version": 100,
Expand All @@ -24,7 +24,7 @@
"tag": "req 2@200",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 20000,
"item": 2,
"version": 200,
Expand All @@ -44,7 +44,7 @@
"tag": "req 3@300",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 30000,
"item": 3,
"version": 300,
Expand All @@ -64,7 +64,7 @@
"tag": "req 4@400",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 40000,
"item": 4,
"version": 400,
Expand All @@ -84,7 +84,7 @@
"tag": "req 5@500",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 50000,
"item": 5,
"version": 500,
Expand All @@ -104,7 +104,7 @@
"tag": "req 6@600",
"location": {
"kind": "codebeamer",
"cb_root": "https://localhost:8999",
"cb_root": "https://localhost:MOCK_SERVER_PORT",
"tracker": 60000,
"item": 6,
"version": 600,
Expand Down
Loading
Loading