Skip to content

Commit

Permalink
fix: Import test result correctly when the report contains the suite …
Browse files Browse the repository at this point in the history
…path
  • Loading branch information
felipebz committed May 24, 2024
1 parent 59f081f commit b5918c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ class TestResultImporter(private val objectLocator: ObjectLocator,
val testExecutions = serializer.read(TestExecutions::class.java, report)

testExecutions.files?.forEach { file ->
val mappedTest = objectLocator.findTestObject(file.path, PlSqlGrammar.CREATE_PACKAGE_BODY)
val packageName = file.path.substringAfterLast('.')
val mappedTest = objectLocator.findTestObject(packageName, PlSqlGrammar.CREATE_PACKAGE)
val inputFile = mappedTest?.inputFile ?: context.fileSystem()
.inputFile(context.fileSystem().predicates().hasPath(file.path))

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<testExecutions version="1">
<file path="test_package">
<file path="my.suite.test_package">
<testCase name="test_1" duration="1">
</testCase>
<testCase name="test_2" duration="1">
Expand Down

0 comments on commit b5918c0

Please sign in to comment.