Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ARSnova Scala Prototype
Manage
Activity
Members
Labels
Plan
Issues
16
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Scala Prototype
Commits
20cb57ca
There was a problem fetching the latest pipeline status.
Commit
20cb57ca
authored
8 years ago
by
Tom Käsler
Browse files
Options
Downloads
Patches
Plain Diff
add a basic tutor to the simulation
parent
17dd7f73
1 merge request
!14
Stresstest
Pipeline
#7902
failed with stages
in 3 minutes and 2 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/it/scala/de/thm/arsnova/Stresstest.scala
+9
-1
9 additions, 1 deletion
src/it/scala/de/thm/arsnova/Stresstest.scala
src/it/scala/de/thm/arsnova/tutor/BasicTutorSimulation.scala
+22
-0
22 additions, 0 deletions
src/it/scala/de/thm/arsnova/tutor/BasicTutorSimulation.scala
with
31 additions
and
1 deletion
src/it/scala/de/thm/arsnova/Stresstest.scala
+
9
−
1
View file @
20cb57ca
package
de.thm.arsnova
import
de.thm.arsnova.auditor.BasicAuditorSimulation
import
de.thm.arsnova.tutor.BasicTutorSimulation
import
io.gatling.core.Predef._
// 2
import
io.gatling.http.Predef._
...
...
@@ -29,5 +30,12 @@ class Stresstest extends Simulation {
BasicAuditorSimulation
.
answerToMCQuestion
)
setUp
(
auditorScn
.
inject
(
atOnceUsers
(
1000
))).
protocols
(
httpProtocol
)
val
tutorScn
=
scenario
(
"Basic Tutor"
).
exec
(
BasicTutorSimulation
.
createSession
)
setUp
(
auditorScn
.
inject
(
atOnceUsers
(
1000
)),
tutorScn
.
inject
(
atOnceUsers
(
100
))
).
protocols
(
httpProtocol
)
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
src/it/scala/de/thm/arsnova/tutor/BasicTutorSimulation.scala
0 → 100644
+
22
−
0
View file @
20cb57ca
package
de.thm.arsnova.tutor
import
de.thm.arsnova.models.Session
import
io.gatling.core.Predef._
// 2
import
io.gatling.http.Predef._
import
scala.concurrent.duration._
import
spray.json._
import
akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._
import
java.util.Calendar
object
BasicTutorSimulation
{
import
de.thm.arsnova.mappings.SessionJsonProtocol._
val
now
=
Calendar
.
getInstance
.
getTime
.
toString
val
newSession
=
Session
(
None
,
"12312312"
,
1
,
"A new Session"
,
"ans"
,
now
,
now
,
true
,
false
,
false
,
None
)
val
createSession
=
exec
(
http
(
"Tutor creates session"
)
.
post
(
"/session/"
)
.
header
(
"Content-Type"
,
"application/json"
)
.
body
(
StringBody
(
newSession
.
toJson
.
toString
)).
asJSON
)
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment