Skip to content

Commit 8c29ec3

Browse files
authored
[Release 0.7] JUNIT report support (#328)
* Enable junit report for analysis tests (#322) * Enable junit report for analysis tests Signed-off-by: Maayan Hadasi <[email protected]> * Changes after coderabbitai review Signed-off-by: Maayan Hadasi <[email protected]> --------- Signed-off-by: Maayan Hadasi <[email protected]> * Adding test dependency install in Makefile command (#324) * Adding test dependency install in Makefile command Signed-off-by: Maayan Hadasi <[email protected]> * Include test-tier3 in test-all Signed-off-by: Maayan Hadasi <[email protected]> --------- Signed-off-by: Maayan Hadasi <[email protected]> * Generate unique JUnit report filenames with timestamp (#326) Signed-off-by: Maayan Hadasi <[email protected]> * Remove Hub tests from TIER1 (#327) * Remove Hub tests from TIER1 Signed-off-by: Maayan Hadasi <[email protected]> * Update README Signed-off-by: Maayan Hadasi <[email protected]> --------- Signed-off-by: Maayan Hadasi <[email protected]> --------- Signed-off-by: Maayan Hadasi <[email protected]>
1 parent f1d4381 commit 8c29ec3

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ test-tier0:
3333

3434
# TIER1 - all normal features expected to work.
3535
test-tier1:
36-
${MAKE} test-hub-api
3736
$(MAKE) test-metrics
3837
TIER1=1 $(MAKE) test-analysis
3938

@@ -53,7 +52,10 @@ test-tier3:
5352

5453
# Application analysis tests.
5554
test-analysis:
56-
go test -count=1 -p=1 -timeout 7200s -v ./analysis/...
55+
go install github.com/jstemmer/go-junit-report/v2@latest
56+
mkdir -pv ${JUNIT_REPORT_DIR}
57+
go test -count=1 -p=1 -timeout 7200s -v ./analysis/... 2>&1 | \
58+
go-junit-report -iocopy -set-exit-code -out ${JUNIT_REPORT_DIR}/analysis-report_$$(date +%s).xml
5759

5860
# Metrics.
5961
test-metrics:
@@ -74,7 +76,7 @@ test-hub-api:
7476
# Add next features tests here and call the target from appropriate stage.
7577

7678
# Execute all tests.
77-
test-all: test-tier0 test-tier1 test-tier2
79+
test-all: test-tier0 test-tier1 test-tier2 test-tier3
7880

7981
# Merge Junit reports
8082
merge-report:

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ To provide maximum information about the project functionality, tests were separ
7777

7878
### Tier 0
7979

80-
Very basic and core functionality. A bug here would lead to mostly useless project. This tier should never fail. Examples: Hub API or a basic application analysis flow.
80+
Very basic and core functionality. A bug here would lead to mostly useless project. This tier should never fail. Examples: basic application analysis flow.
8181

8282
```
8383
$ make test-tier0
@@ -107,6 +107,16 @@ Tests involving credentials or private resources which are supplied as part of t
107107
$ make test-tier3
108108
```
109109

110+
## Hub API tests
111+
112+
Runs the upstream Hub API tests suite against a running Konveyor instance. It clones `konveyor/tackle2-hub` and executes its `make test-api`.
113+
114+
These tests are not part of any tier and are run separately.
115+
116+
```
117+
$ make test-hub-api
118+
```
119+
110120
## Test execution options
111121

112122
### DEBUG

0 commit comments

Comments
 (0)