changeset 801:f07a59880d45

Variable prefix changed. $ -> @
author Devel 2
date Thu, 04 Jan 2018 08:58:13 +0100
parents 06bb0c4c4a5d
children 01ee64902f6a
files stress-tester/src/main/java/com/passus/st/filter/HttpMessageValueExtractor.java stress-tester/src/test/java/com/passus/st/ConverterHttpClientTest.java stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCounterFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpLogoutFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMarkFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMatchFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java stress-tester/src/test/java/com/passus/st/client/http/filter/HttpZoneFilterTest.java stress-tester/src/test/java/com/passus/st/filter/HttpMessageValueExtractorTest.java stress-tester/src/test/resources/com/passus/st/client/http/filter/http_message_modify_filter.yml stress-tester/src/test/resources/com/passus/st/client/http/filter/sequence.yml
diffstat 15 files changed, 111 insertions(+), 94 deletions(-) [+]
line wrap: on
line diff
--- a/stress-tester/src/main/java/com/passus/st/filter/HttpMessageValueExtractor.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/main/java/com/passus/st/filter/HttpMessageValueExtractor.java	Thu Jan 04 08:58:13 2018 +0100
@@ -1,5 +1,6 @@
 package com.passus.st.filter;
 
+import com.passus.filter.BeanValueExtractor;
 import com.passus.filter.ValueExtractor;
 import com.passus.net.http.URL;
 import com.passus.st.client.http.filter.HttpMessageWrapper;
@@ -15,6 +16,10 @@
 
     private final String fieldName;
 
+    public HttpMessageValueExtractor(String fieldName) {
+        this(fieldName, new BeanValueExtractor(fieldName));
+    }
+
     public HttpMessageValueExtractor(String fieldName, ValueExtractor fallbackExtractor) {
         this.fieldName = fieldName;
         this.fallbackExtractor = fallbackExtractor;
@@ -30,34 +35,33 @@
     }
 
     private Object extractFromWrapper(HttpMessageWrapper wrapper) {
-
         switch (fieldName) {
-            case "req.version":
-            case "req.getVersion()":
+            case "@req.version":
+            case "@req.getVersion()":
                 return wrapper.getReq().getVersion();
-            case "req.method":
-            case "req.getMethod()":
+            case "@req.method":
+            case "@req.getMethod()":
                 return wrapper.getReq().getMethod();
-            case "req.sessionId":
-            case "req.getSessionId()":
+            case "@req.sessionId":
+            case "@req.getSessionId()":
                 return wrapper.getReq().getSessionId();
-            case "req.url":
-            case "req.getUrl()":
+            case "@req.url":
+            case "@req.getUrl()":
                 return wrapper.getReq().getUrl();
-            case "req.uri":
-            case "req.getUri()":
+            case "@req.uri":
+            case "@req.getUri()":
                 return wrapper.getReq().getUri();
-            case "resp.version":
-            case "resp.getVersion()":
+            case "@resp.version":
+            case "@resp.getVersion()":
                 return wrapper.getResp().getVersion();
-            case "resp.status":
-            case "resp.getStatus()":
+            case "@resp.status":
+            case "@resp.getStatus()":
                 return wrapper.getResp().getStatus();
-            case "resp.status.code":
-            case "resp.getStatus().getCode()":
+            case "@resp.status.code":
+            case "@resp.getStatus().getCode()":
                 return wrapper.getResp().getStatus().getCode();
             default:
-                if (fieldName.startsWith("req.url.")) {
+                if (fieldName.startsWith("@req.url.")) {
                     URL url = wrapper.getReq().getUrl();
                     String urlPart = fieldName.substring(8);
                     switch (urlPart) {
--- a/stress-tester/src/test/java/com/passus/st/ConverterHttpClientTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/ConverterHttpClientTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -155,7 +155,7 @@
         HttpResponse resp2 = HttpResponseBuilder.status(HttpStatus.NO_CONTENT).build();
 
         ArrayListEventDestination dst = new ArrayListEventDestination();
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{req.url: {$contains: test2}}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{'@req.url': {$contains: test2}}");
         HttpMatchFilter f = new HttpMatchFilter();
         f.setPredicate(predicate);
         f.setAcceptOnMatch(false);
@@ -255,7 +255,7 @@
     public void testZone_() {
         HttpRequest req = HttpRequestBuilder.get("http://test.com/test").build();
         HttpResponse resp = HttpResponseBuilder.ok().build();
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{req.url: {$contains: test}}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{\"@req.url\": {$contains: test}}");
 
         HttpZoneFilter f = new HttpZoneFilter();
         f.addRule(new HttpZoneFilter.Rule("testZone", predicate));
@@ -288,7 +288,7 @@
     public void testMarker_() {
         HttpRequest req = HttpRequestBuilder.get("http://test/test").build();
 
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{req.url: {$contains: test}}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{\"@req.url\": {$contains: test}}");
         HttpMarkFilter f = new HttpMarkFilter();
         f.addRule(new HttpMarkFilter.MarkerRule("category1", predicate));
         ConverterHttpClient client = client(f);
--- a/stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/HttpSynchClientWorkerTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -133,7 +133,7 @@
         }
     }
 
-    @Test
+    @Test(enabled = false)
     public void testHandle1() throws Exception {
         Log4jConfigurationFactory.enableFactory(Level.DEBUG);
 
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpBasicAuthLoginFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -122,7 +122,7 @@
         String filterConfig = "filters:\n"
                 + "    - type: basicLogin\n"
                 + "      applyIf:\n"
-                + "          \"req.uri\": {$contains: \"index2\"}\n"
+                + "          \"@req.uri\": {$contains: \"index2\"}\n"
                 + "      provider:\n"
                 + "        UsernamePassword:\n"
                 + "            username: login\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCounterFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpCounterFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -27,7 +27,7 @@
 
         TestListener listener = new TestListener();
 
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{resp.status.code: 500}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{'@resp.status.code': 500}");
         HttpCounterFilter filter = new HttpCounterFilter();
         filter.setLimit(2);
         filter.setName("filter status code 500");
@@ -46,7 +46,7 @@
                 + "    - type: counter\n"
                 + "      name: 'filter x'\n"
                 + "      limit: 3\n"
-                + "      applyIf: {resp.status.code: 404}\n";
+                + "      applyIf: {'@resp.status.code': 404}\n";
 
         Errors errors = new Errors();
         List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(filterConfig, errors, null);
@@ -63,7 +63,7 @@
         AndPredicate<? extends Object> andPredicate = (AndPredicate) filter.getPredicate().getPredicate();
         assertEquals(1, andPredicate.getSubPredicates().size());
         ComparisonPredicate predicate = (ComparisonPredicate) andPredicate.getSubPredicates().get(0);
-        assertEquals("resp.status.code", predicate.getFieldName());
+        assertEquals("@resp.status.code", predicate.getFieldName());
         assertEquals(ComparisonOperator.EQUAL, predicate.getOperator());
     }
 
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpLogoutFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpLogoutFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -38,7 +38,7 @@
 
     @Test
     public void testFilter_InvalidateSession() {
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{req.uri: \"/logout\"}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{'@req.uri': \"/logout\"}");
         HttpRequest req = HttpRequestBuilder.get("http://test.com/logout").build();
         HttpResponse resp = HttpResponseBuilder.ok().build();
         HttpScopes scopes = new HttpScopes();
@@ -60,7 +60,7 @@
 
     @Test
     public void testFilter_NotInvalidateSession() {
-        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{req.uri: \"/logout\"}");
+        HttpMessagePredicate predicate = HttpFilterTestUtils.createPredicate("{'@req.uri': \"/logout\"}");
         HttpRequest req = HttpRequestBuilder.get("http://test.com/logout").build();
         HttpResponse resp = HttpResponseBuilder.ok().build();
         HttpScopes scopes = new HttpScopes();
@@ -86,7 +86,7 @@
         String filterConfig = "filters:\n"
                 + "    - type: logout\n"
                 + "      invalidateSession: false\n"
-                + "      applyIf: {\"req.uri\": \"/logout\"}\n";
+                + "      applyIf: {\"@req.uri\": \"/logout\"}\n";
 
         Errors errors = new Errors();
         List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(filterConfig, errors, null);
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMarkFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMarkFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -31,7 +31,7 @@
 
     @Test
     public void testFilterInbound() throws Exception {
-        HttpMessagePredicate predicate = HttpMessagePredicate.parse("{req.url: {$contains: test}}");
+        HttpMessagePredicate predicate = HttpMessagePredicate.parse("{'@req.url': {$contains: test}}");
         HttpMarkFilter filter = new HttpMarkFilter();
         filter.addRule(new MarkerRule("category1", predicate));
 
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMatchFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMatchFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -63,26 +63,26 @@
     @Test
     public void testFilterOutbound() {
         List<HttpRequest> reqs;
-        reqs = filter(requests, "{req.url: {$contains: \"test2\"}}");
+        reqs = filter(requests, "{'@req.url': {$contains: \"test2\"}}");
         assertEquals(1, reqs.size());
         assertEquals("/test2", reqs.get(0).getUri().toString());
 
-        reqs = filter(requests, "{req.uri: {$contains: \"test2\"}}");
+        reqs = filter(requests, "{'@req.uri': {$contains: \"test2\"}}");
         assertEquals(1, reqs.size());
         assertEquals("/test2", reqs.get(0).getUri().toString());
 
-        reqs = filter(requests, "{\"req.getHeader('Header')\": {$contains: \"Val\"}}");
+        reqs = filter(requests, "{\"@req.getHeader('Header')\": {$contains: \"Val\"}}");
         assertEquals(1, reqs.size());
         assertEquals("/test", reqs.get(0).getUri().toString());
 
         List<HttpResponse> resps;
-        resps = filter(responses, "{resp.status.code: 200}");
+        resps = filter(responses, "{'@resp.status.code': 200}");
         assertEquals(1, resps.size());
 
-        resps = filter(responses, "{resp.status.code: '200'}");
+        resps = filter(responses, "{'@resp.status.code': '200'}");
         assertEquals(1, resps.size());
 
-        resps = filter(responses, "{resp.status.code: {$gt: 200}}");
+        resps = filter(responses, "{'@resp.status.code': {$gt: 200}}");
         assertEquals(2, resps.size());
     }
 
@@ -91,8 +91,8 @@
         String filterConfig = "filters:\n"
                 + "    - type: matcher\n"
                 + "      matches:\n"
-                + "          req.uri: {$contains: 'test'}\n"
-                + "          resp.status.code: 200\n";
+                + "          '@req.uri': {$contains: 'test'}\n"
+                + "          '@resp.status.code': 200\n";
 
         Errors errors = new Errors();
         List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(filterConfig, errors, null);
@@ -104,11 +104,11 @@
         HttpMatchFilter filter = (HttpMatchFilter) filters.get(0);
         HttpMessagePredicate predicate = filter.getPredicate();
 
-        List<HttpRequest> res = filter(requests, "{req.url: {$contains: \"test2\"}}");
+        List<HttpRequest> res = filter(requests, "{'@req.url': {$contains: \"test2\"}}");
         assertEquals(1, res.size());
         assertEquals("/test2", res.get(0).getUri().toString());
 
-        res = filter(requests, "{req.uri: {$contains: \"test2\"}}");
+        res = filter(requests, "{'@req.uri': {$contains: \"test2\"}}");
         assertEquals(1, res.size());
         assertEquals("/test2", res.get(0).getUri().toString());
     }
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageModificationFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -133,9 +133,9 @@
                 + "        setHeader: \n"
                 + "            Header3: Header1Value3a\n"
                 + "        setHeader: \n"
-                + "            Header6: \"$scopes.getSession('testId').get('testParam')\"\n"
+                + "            Header6: \"@scopes.getSession('testId').get('testParam')\"\n"
                 + "        setHeader: \n"
-                + "            Header7: \"$httpSession.get('testParam')\"\n";
+                + "            Header7: \"@httpSession.get('testParam')\"\n";
 
         Errors errors = new Errors();
         List<HttpFilter> filters = HttpFiltersConfigurator.getFilters(filterConfig, errors, null);
@@ -174,9 +174,9 @@
                 + "    - type: modifyMessage\n"
                 + "      operations:\n"
                 + "        setQueryParam: \n"
-                + "            v1: {$expr: \"$httpSession.get('testParam2') or 'aaa'\"}\n"
+                + "            v1: {$expr: \"httpSession.get('testParam2') or 'aaa'\"}\n"
                 + "        setQueryParam: \n"
-                + "            v2: {$expr: \"$httpSession.get('testParam2') or $httpSession.get('testParam')\"}\n";
+                + "            v2: {$expr: \"httpSession.get('testParam2') or httpSession.get('testParam')\"}\n";
 
         HttpRequest req = HttpRequestBuilder.get("http://test.com/path/test")
                 .tag(TAG_SESSION_ID, "sessionId")
@@ -201,7 +201,7 @@
         String filterConfig = "filters:\n"
                 + "    - type: modifyMessage\n"
                 + "      applyIf:\n"
-                + "        \"req.uri\": /path/test\n"
+                + "        \"@req.uri\": /path/test\n"
                 + "      operations:\n"
                 + "        removeHeader: Header1\n"
                 + "        setContent:\n"
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpMessageWrapperTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -83,60 +83,60 @@
         BeanValueExtractor e;
         Object value;
 
-        e = bean("$req.getVersion()");
+        e = bean("@req.getVersion()");
         value = e.extract(wrapper);
         assertTrue(value instanceof ByteString);
         assertEquals("HTTP/1.1", value.toString());
 
-        e = bean("$req.method");
+        e = bean("@req.method");
         value = e.extract(wrapper);
         assertEquals("GET", value.toString());
 
-        e = bean("$req.version");
+        e = bean("@req.version");
         value = e.extract(wrapper);
         assertEquals("HTTP/1.1", value.toString());
 
-        e = bean("$req.uri");
+        e = bean("@req.uri");
         value = e.extract(wrapper);
         assertEquals("/index?action=delete", value.toString());
 
-        e = bean("$req.url");
+        e = bean("@req.url");
         value = e.extract(wrapper);
         assertTrue(value instanceof URL);
 
-        e = bean("$req.url.query");
+        e = bean("@req.url.query");
         value = e.extract(wrapper);
         assertEquals("action=delete", value.toString());
 
-        e = bean("$req.getHeader('User-Agent')");
+        e = bean("@req.getHeader('User-Agent')");
         value = e.extract(wrapper);
         assertEquals("stress-tester", value.toString());
 
-        e = bean("$resp.status");
+        e = bean("@resp.status");
         value = e.extract(wrapper);
         assertTrue(value instanceof HttpStatus);
 
-        e = bean("$resp.status.code");
+        e = bean("@resp.status.code");
         value = e.extract(wrapper);
         assertEquals(200, value);
 
-        e = bean("$resp.getHeader('Content-Type')");
+        e = bean("@resp.getHeader('Content-Type')");
         value = e.extract(wrapper);
         assertEquals("text/plain", value.toString());
 
-        e = bean("$context");
+        e = bean("@context");
         value = e.extract(wrapper);
         assertNull(value);
 
-        e = bean("$scopes");
+        e = bean("@scopes");
         value = e.extract(wrapper);
         assertTrue(value instanceof HttpScopes);
 
-        e = bean("$httpSession");
+        e = bean("@httpSession");
         value = e.extract(wrapper);
         assertTrue(value instanceof ParametersBag);
 
-        e = bean("$httpSession.get('Var1')");
+        e = bean("@httpSession.get('Var1')");
         value = e.extract(wrapper);
         assertEquals("Val1", value);
     }
@@ -148,7 +148,7 @@
         HashMap<String, Object> map = new HashMap<>();
         map.put("request", wrapper.getReq());
 
-        e = bean("$request.version");
+        e = bean("@request.version");
         value = e.extract(map);
         assertEquals("HTTP/1.1", value.toString());
     }
@@ -158,44 +158,44 @@
         MvelValueExtractor e;
         Object value;
 
-        e = mvel("$req.getVersion()");
+        e = mvel("req.getVersion()");
         value = e.extract(wrapper);
         assertEquals("HTTP/1.1", value.toString());
         assertTrue(value instanceof ByteString);
 
-        e = mvel("$req.version");
+        e = mvel("req.version");
         value = e.extract(wrapper);
         assertEquals("HTTP/1.1", value.toString());
 
-//        e = mvel("$req.url");
+//        e = mvel("req.url");
 //        value = e.extract(wrapper);
 //        // String
 
-        e = mvel("$req.url.query");
+        e = mvel("req.url.query");
         value = e.extract(wrapper);
         assertEquals("action=delete", value.toString());
 
-        e = mvel("$req.getHeader('User-Agent')");
+        e = mvel("req.getHeader('User-Agent')");
         value = e.extract(wrapper);
         assertEquals("stress-tester", value.toString());
 
-        e = mvel("$resp.status.code");
+        e = mvel("resp.status.code");
         value = e.extract(wrapper);
         assertEquals(200, value);
 
-        e = mvel("$httpSession.get('Var1')");
+        e = mvel("httpSession.get('Var1')");
         value = e.extract(wrapper);
         assertEquals("Val1", value);
 
-        e = mvel("$httpSession.get('NoSuchVar') or 'defaultValue'");
+        e = mvel("httpSession.get('NoSuchVar') or 'defaultValue'");
         value = e.extract(wrapper);
         assertEquals("defaultValue", value);
 
-        e = mvel("$httpSession.get('NoSuchVar') or $httpSession.get('Var1')");
+        e = mvel("httpSession.get('NoSuchVar') or httpSession.get('Var1')");
         value = e.extract(wrapper);
         assertEquals("Val1", value);
 
-        e = mvel("$httpSession.get('Var1') + $httpSession.get('Var1')");
+        e = mvel("httpSession.get('Var1') + httpSession.get('Var1')");
         value = e.extract(wrapper);
         assertEquals("Val1Val1", value);
 
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpSequenceFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -17,7 +17,6 @@
 import com.passus.net.http.HttpResponseBuilder;
 import com.passus.st.AppUtils;
 import com.passus.st.client.http.filter.HttpSequenceFilter.SequenceItem;
-import com.passus.st.filter.HttpMessageHeaderValueExtractor;
 import com.passus.st.filter.Transformers;
 import java.io.File;
 import java.io.Serializable;
@@ -64,14 +63,14 @@
         TestHttpSequenceListener listener = new TestHttpSequenceListener();
 
         SequenceItem[] seqItems = {
-            item("{\"req.uri\": \"/res1\", \"resp.getCookie('id')\": {$neq: \"0\"}}", 0),
-            item("{\"req.getHeader('xyz')\": \"abc\", \"req.getCookie('id')\": \"$_i0.resp.getCookie('id')\"}", 1, "last"),};
+            item("{\"@req.uri\": \"/res1\", \"@resp.getCookie('id')\": {$neq: \"0\"}}", 0),
+            item("{\"@req.getHeader('xyz')\": \"abc\", \"@req.getCookie('id')\": \"@_i0.resp.getCookie('id')\"}", 1, "last"),};
 
         Map<String, ValueExtractor> values = new HashMap<>();
-        values.put("code", value("$_i0.resp.status.code"));
-        values.put("xhost", value("$_i0.req.url.host"));
-        values.put("header", value("$_i1.req.getHeader('xyz')"));
-        values.put("cookie", value("$last.req.getCookie('id')"));
+        values.put("code", value("_i0.resp.status.code"));
+        values.put("xhost", value("_i0.req.url.host"));
+        values.put("header", value("_i1.req.getHeader('xyz')"));
+        values.put("cookie", value("last.req.getCookie('id')"));
         values.put("seqName", value("example sequence"));
 
         HttpSequenceFilter filter = new HttpSequenceFilter().instanceForWorker(0);
@@ -131,7 +130,7 @@
         ComparisonPredicate sp1 = (ComparisonPredicate) p0.getSubPredicates().get(1);
         assertEquals(ComparisonOperator.NOT_EQUAL, sp1.getOperator());
 
-        assertEquals("resp.getCookie('id')", sp1.getFieldName());
+        assertEquals("@resp.getCookie('id')", sp1.getFieldName());
 
         UnmutableValueExtractor uve = (UnmutableValueExtractor) sp1.getPattern();
         assertEquals(123, uve.extract(null));
--- a/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpZoneFilterTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/client/http/filter/HttpZoneFilterTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -38,7 +38,7 @@
         HttpResponse respIn = HttpResponseBuilder.ok().build();
 
         HttpZoneFilter filter = new HttpZoneFilter();
-        filter.addRule(new Rule("testZone", HttpFilterTestUtils.createPredicate("{req.url: {$contains: \"test\"}}")));
+        filter.addRule(new Rule("testZone", HttpFilterTestUtils.createPredicate("{'@req.url': {$contains: 'test'}}")));
 
         filter.filterOutbound(req, respOut, null);
         filter.filterInbound(req, respIn, null);
--- a/stress-tester/src/test/java/com/passus/st/filter/HttpMessageValueExtractorTest.java	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/java/com/passus/st/filter/HttpMessageValueExtractorTest.java	Thu Jan 04 08:58:13 2018 +0100
@@ -1,5 +1,6 @@
 package com.passus.st.filter;
 
+import com.passus.filter.BeanValueExtractor;
 import com.passus.net.http.HttpRequest;
 import com.passus.net.http.HttpRequestBuilder;
 import com.passus.net.http.HttpResponse;
@@ -7,7 +8,7 @@
 import com.passus.net.http.HttpStatus;
 import static com.passus.st.client.http.HttpConsts.TAG_SESSION_ID;
 import com.passus.st.client.http.filter.HttpMessageWrapper;
-import static org.testng.Assert.*;
+import static com.passus.st.utils.Assert.*;
 import org.testng.annotations.Test;
 
 /**
@@ -16,19 +17,31 @@
  */
 public class HttpMessageValueExtractorTest {
 
-    private static final HttpRequest REQ = HttpRequestBuilder.get("http://www.example.com/1")
-            .tag(TAG_SESSION_ID, "sid1").build();
+    private final HttpRequest REQ;
 
-    private static final HttpResponse RESP = HttpResponseBuilder.ok().build();
+    private final HttpResponse RESP;
 
-    private static final HttpMessageWrapper WRAPPER = new HttpMessageWrapper(REQ, RESP, null);
+    private final HttpMessageWrapper WRAPPER;
 
-    private static Object extract(String expr) {
-        return new HttpMessageValueExtractor(expr, null).extract(WRAPPER);
+    public HttpMessageValueExtractorTest() {
+        REQ = HttpRequestBuilder.get("http://www.example.com/1")
+                .tag(TAG_SESSION_ID, "sid1").build();
+
+        RESP = HttpResponseBuilder.ok().build();
+        WRAPPER = new HttpMessageWrapper(REQ, RESP, null);
+    }
+
+    private Object extract(String expr) {
+        return extract(expr, WRAPPER);
+    }
+
+    private Object extract(String expr, Object context) {
+        BeanValueExtractor fallbackExtractor = new BeanValueExtractor(expr);
+        return new HttpMessageValueExtractor(expr, fallbackExtractor).extract(context);
     }
 
     @Test
-    public void testExtract() {
+    public void testExtract_HttpMessageWrapper() {
         assertEquals("HTTP/1.1", extract("req.version").toString());
         assertEquals("HTTP/1.1", extract("req.getVersion()").toString());
         assertEquals("GET", extract("req.method").toString());
@@ -46,4 +59,5 @@
         assertEquals(200, extract("resp.status.code"));
         assertEquals(200, extract("resp.getStatus().getCode()"));
     }
+
 }
--- a/stress-tester/src/test/resources/com/passus/st/client/http/filter/http_message_modify_filter.yml	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/resources/com/passus/st/client/http/filter/http_message_modify_filter.yml	Thu Jan 04 08:58:13 2018 +0100
@@ -16,7 +16,7 @@
 
     - type: basicLogin
       applyIf:
-          "req.url": {$contains: "test"}
+          "@req.url": {$contains: "test"}
       provider:
         UsernamePassword:
             username: login
--- a/stress-tester/src/test/resources/com/passus/st/client/http/filter/sequence.yml	Wed Jan 03 12:49:59 2018 +0100
+++ b/stress-tester/src/test/resources/com/passus/st/client/http/filter/sequence.yml	Thu Jan 04 08:58:13 2018 +0100
@@ -1,13 +1,13 @@
 filters:
   - type: sequence
     sequence:
-      - match: {req.uri: "/res1", resp.getCookie('id'): {$neq: "123"}}
-      - match: {req.getHeader('xyz'): "abc"}
+      - match: {"@req.uri": "/res1", "@resp.getCookie('id')": {$neq: "123"}}
+      - match: {"@req.getHeader('xyz')": "abc"}
         mustOccur: true
         time: 20000
         alias: last
     values:
-        code: $_i0.resp.status.code
-        xhost: $_i0.req.url.host
-        header: $last.req.getHeader('xyz')
-        cookie: $_i1.req.getCookie('id')
+        code: '@_i0.resp.status.code'
+        xhost: '@_i0.req.url.host'
+        header: "@last.req.getHeader('xyz')"
+        cookie: "@_i1.req.getCookie('id')"