-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
extracting karate feature to separate class
- Loading branch information
1 parent
acfd625
commit e0feabc
Showing
2 changed files
with
34 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package org.znsio.perfiz | ||
|
||
import java.util.{ArrayList, List} | ||
|
||
import org.znsio.perfiz.ClosedWorkloadModel.{ConstantConcurrentUsers, RampConcurrentUsers} | ||
import org.znsio.perfiz.OpenWorkloadModel._ | ||
|
||
import scala.beans.BeanProperty | ||
import scala.jdk.CollectionConverters._ | ||
import scala.language.postfixOps | ||
|
||
class KarateFeature { | ||
@BeanProperty | ||
var karateFile: String = _ | ||
|
||
@BeanProperty | ||
var gatlingSimulationName: String = _ | ||
|
||
@BeanProperty | ||
var loadPattern: List[GatlingWorkLoadModelStep] = new ArrayList[GatlingWorkLoadModelStep]() | ||
|
||
@BeanProperty | ||
var uriPatterns: List[String] = new ArrayList[String]() | ||
|
||
def openWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { | ||
val openModelLoadPatterns = scala.List(NothingFor, AtOnceUsers, RampUsers, ConstantUsersPerSecond, RampUsersPerSecond, HeavisideUsers) | ||
openModelLoadPatterns.contains(loadPattern.patternType) | ||
}) | ||
|
||
def closedWorkloadModelSteps = loadPattern.asScala.toList.filter(loadPattern => { | ||
val closedModelLoadPatterns = scala.List(ConstantConcurrentUsers, RampConcurrentUsers) | ||
closedModelLoadPatterns.contains(loadPattern.patternType) | ||
}) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters