Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
HFTSoftwareProject
DTABackend
Commits
420073ca
Commit
420073ca
authored
Oct 28, 2023
by
Lückemeyer
Browse files
added resilience against incomplete test results
parent
506515cb
Pipeline
#8829
passed with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/main/java/de/hftstuttgart/dtabackend/utils/CompetencyAssessmentUtil.java
View file @
420073ca
...
@@ -45,11 +45,13 @@ public class CompetencyAssessmentUtil {
...
@@ -45,11 +45,13 @@ public class CompetencyAssessmentUtil {
for
(
Result
currentResult:
resultSummary
.
results
)
{
for
(
Result
currentResult:
resultSummary
.
results
)
{
if
(
currentResult
.
state
==
Result
.
State
.
SUCCESS
.
ordinal
())
{
if
(
currentResult
.
state
==
Result
.
State
.
SUCCESS
.
ordinal
())
{
TestCompetencyProfile
currentProfile
=
new
TestCompetencyProfile
();
TestCompetencyProfile
currentProfile
=
new
TestCompetencyProfile
();
currentProfile
.
testPackageName
=
currentResult
.
packageName
;
currentProfile
.
testPackageName
=
(
currentResult
.
packageName
!=
null
)?
currentResult
.
packageName
:
""
;
currentProfile
.
testClassName
=
currentResult
.
className
;
currentProfile
.
testClassName
=
(
currentResult
.
className
!=
null
)?
currentResult
.
className
:
""
;
currentProfile
.
testName
=
currentResult
.
name
;
currentProfile
.
testName
=
(
currentResult
.
name
!=
null
)?
currentResult
.
name
:
""
;
int
testIndex
=
testCompetencyProfiles
.
indexOf
(
currentProfile
);
int
testIndex
=
testCompetencyProfiles
.
indexOf
(
currentProfile
);
sumSuccessful
=
TestCompetencyProfile
.
competencySum
(
sumSuccessful
,
testCompetencyProfiles
.
get
(
testIndex
).
competencyAssessments
);
if
(
testIndex
!=-
1
)
{
sumSuccessful
=
TestCompetencyProfile
.
competencySum
(
sumSuccessful
,
testCompetencyProfiles
.
get
(
testIndex
).
competencyAssessments
);
}
}
}
}
}
return
sumSuccessful
;
return
sumSuccessful
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment