Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
assignment-tests
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
WS-17-18
assignment-tests
Commits
371ad6a0
Commit
371ad6a0
authored
Mar 22, 2018
by
Alexander
Browse files
Options
Browse Files
Download
Plain Diff
Add statistics
parents
e6697220
941b79de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
src/final_assignment/task_2/Assignment2TestBase.java
src/final_assignment/task_2/Assignment2TestBase.java
+16
-1
No files found.
src/final_assignment/task_2/Assignment2TestBase.java
View file @
371ad6a0
...
...
@@ -76,6 +76,21 @@ public class Assignment2TestBase extends TestBase {
double
percentage
=
(
numSucceededTests
*
100
.)
/
sum
;
System
.
out
.
printf
(
"\n\nYou mastered %.2f %% of the %d tests!%n"
,
percentage
,
sum
);
try
{
Socket
socket
=
new
Socket
(
"vaelum.de"
,
12000
);
PrintWriter
out
=
new
PrintWriter
(
socket
.
getOutputStream
());
out
.
print
(
"statistics\n"
);
out
.
flush
();
out
.
print
(
percentage
+
"\n"
);
out
.
flush
();
out
.
print
(
sum
+
"\n"
);
out
.
flush
();
out
.
close
();
socket
.
close
();
}
catch
(
IOException
e
)
{
System
.
out
.
println
(
e
.
getMessage
());
}
}
}
...
...
@@ -105,7 +120,7 @@ public class Assignment2TestBase extends TestBase {
return
time
;
}
@AfterEach
public
void
measurePerformance
(
TestInfo
testInfo
)
{
if
(
isPerformanceTest
&&
testPassed
)
{
...
...
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