All Questions

13
votes
4answers
978 views

Can extractors be customized with parameters in the body of a case statement (or anywhere else that an extractor would be used)?

Basically, I would like to be able to build a custom extractor without having to store it in a variable prior to using it. This isn't a real example of how I would use it, it would more likely be use...
9
votes
3answers
7139 views

Replacing case class inheritance with extractors preserving exhaustiveness checks in Scala

I have a simple class hierarchy that represents a graph-like structure with several distinct types of vertexes implemented using case classes: sealed trait Node sealed abstract case class Vertex ext...
1
votes
1answers
777 views

Is it possible to use implicit conversions for parameters to extractors (unapply) in Scala?

I have created a class called CaseInsensitive which wraps a string (see Implementing a string class that does case insensitive comparisions in Scala). I've created a case class which has a member var...
0
votes
1answers
748 views

JMeter JSON Extractor, extract all values of one key in a string

Using Apache JMeter ver 3.2 r1790745 (the latest) to test a JSON Web Service, the response is like: [ { "id" : 3, "description" : "Back", "name" : "back" }, { "id" : 1, "description" :...
6
votes
1answers
505 views

Difference between home made extractor and case class extractor

According to the scala specification, the extractor built by case classes is the following (scala specification §5.3.2): def unapply[tps](x: c[tps]) = if (x eq null) scala.None else scala.Some(x...
5
votes
1answers
665 views

How to use extractor in polymorphic unapply?

I don't really get this little thingy. I have an abstract class Box with several sub-classes for different types. For example abstract class Box class StringBox(val sValue : String) extends Box The...
8
votes
6answers
10201 views

Scala: Pattern matching when one of two items meets some condition

I'm often writing code that compares two objects and produces a value based on whether they are the same, or different, based on how they are different. So I might write: val result = (v1,v2) match ...
8
votes
5answers
3758 views

Scala, partial functions

Is there any way to create a PartialFunction except through the case statement? I'm curious, because I'd like to express the following (scala pseudo ahead!)... val bi = BigInt(_) if (bi.isValidInt) ...
2
votes
1answers
3783 views

How to use variable extracted in JSON path extractor for further steps of scenario?

I have created one scenario in Jmeter where i am loging in. (For this scenario i am using REST APIs) For this i took one "HTTP Header Manager" , "HTTP Request Sampler". After login i am extracting au...
1
votes
2answers
80 views

Regular Expression Extractor Jmeter - I want to send email for 404 response codes

I am writing a test case which will hit a URLs and send email if response code is 404. Request is going well and Response also coming but I am stuck at Regular Expression Extractor.Sample Request Resu...

Previous Next