Repository: authorjapps/zerocode
Pull request #402 (2020-06-10 11:03:53)

Env param values and general improvements
# <Feature Title>

PR Branch
**_#ADD LINK TO THE PR BRANCH_**

## Motivation and Context

## Checklist:

* [x] Unit tests added

* [x] Integration tests added

* [x] Test names are meaningful

* [x] Feature manually tested

* [ ] Branch build passed

* [x] No 'package.*' in the imports

* [ ] Relevant Wiki page updated with clear instruction for the end user
  * [x] Not applicable. This was only a refactor change, no functional or behaviour changes were introduced

* [ ] Http test added to `http-testing` module(if applicable) ?
  * [x] Not applicable. The changes did not affect HTTP automation flow

* [ ] Kafka test added to `kafka-testing` module(if applicable) ?
  * [x] Not applicable. The changes did not affect Kafka automation flow



Patch:
diff --git a/core/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustHttpClient.java b/core/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustHttpClient.java
index 8dd74763..2d1cb25f 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustHttpClient.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/httpclient/ssl/SslTrustHttpClient.java
@@ -88,7 +88,7 @@ public class SslTrustHttpClient extends BasicHttpClient {
         RequestConfig timeOutConfig;
         if (implicitWait == null) {
             timeOutConfig = RequestConfig.DEFAULT;
-            LOGGER.warn("\n*Implicit-Wait/Connection-Timeout not configured.*" +
+            LOGGER.debug("\n*Implicit-Wait/Connection-Timeout not configured.*" +
                             "\nE.g. to configure it for 10sec, use: '{}={}' in the host-config properties. " +
                             "\n**You can safely ignore this warning to retain the default httpClient behavior**\n",
                     HTTP_MAX_TIMEOUT_MILLISECONDS, 10000);
diff --git a/core/src/main/java/org/jsmart/zerocode/core/kafka/client/BasicKafkaClient.java b/core/src/main/java/org/jsmart/zerocode/core/kafka/client/BasicKafkaClient.java
index 2d0fbc44..1f80eed9 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/kafka/client/BasicKafkaClient.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/kafka/client/BasicKafkaClient.java
@@ -23,7 +23,7 @@ public class BasicKafkaClient {
         LOGGER.info("brokers:{}, topicName:{}, operation:{}, requestJson:{}", brokers, topicName, operation, requestJson);
 
         try {
-            switch (operation) {
+            switch (operation.toLowerCase()) {
                 case "send":
                 case "load":
                 case "publish":
diff --git a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeMultiStepsScenarioRunnerImpl.java b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeMultiStepsScenarioRunnerImpl.java
index 3384b2ab..7f841810 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeMultiStepsScenarioRunnerImpl.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeMultiStepsScenarioRunnerImpl.java
@@ -435,7 +435,7 @@ public class ZeroCodeMultiStepsScenarioRunnerImpl implements ZeroCodeMultiStepsS
                         .requestTimeStamp(requestTimeStamp)
                         .step(thisStepName)
                         .url(url)
-                        .method(operationName)
+                        .method(operationName.toUpperCase())
                         .id(stepId)
                         .request(prettyPrintJson(resolvedRequestJson));
 
diff --git a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java
index 019aebcd..46d70bf2 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodePackageRunner.java
@@ -17,9 +17,13 @@ import org.jsmart.zerocode.core.domain.ScenarioSpec;
 import org.jsmart.zerocode.core.domain.Scenarios;
 import org.jsmart.zerocode.core.domain.TargetEnv;
 import org.jsmart.zerocode.core.domain.TestPackageRoot;
+import org.jsmart.zerocode.core.domain.UseHttpClient;
+import org.jsmart.zerocode.core.domain.UseKafkaClient;
 import org.jsmart.zerocode.core.engine.listener.ZeroCodeTestReportListener;
 import org.jsmart.zerocode.core.httpclient.BasicHttpClient;
+import org.jsmart.zerocode.core.httpclient.ssl.SslTrustHttpClient;
 import org.jsmart.zerocode.core.kafka.client.BasicKafkaClient;
+import org.jsmart.zerocode.core.kafka.client.ZerocodeCustomKafkaClient;
 import org.jsmart.zerocode.core.report.ZeroCodeReportGenerator;
 import org.jsmart.zerocode.core.utils.SmartUtils;
 import org.junit.runner.Description;
@@ -34,8 +38,6 @@ import static com.google.inject.Guice.createInjector;
 import static java.lang.System.getProperty;
 import static org.jsmart.zerocode.core.constants.ZeroCodeReportConstants.CHARTS_AND_CSV;
 import static org.jsmart.zerocode.core.constants.ZeroCodeReportConstants.ZEROCODE_JUNIT;
-import static org.jsmart.zerocode.core.utils.RunnerUtils.getCustomHttpClientOrDefault;
-import static org.jsmart.zerocode.core.utils.RunnerUtils.getCustomKafkaClientOrDefault;
 import static org.jsmart.zerocode.core.utils.RunnerUtils.getEnvSpecificConfigFile;
 
 public class ZeroCodePackageRunner extends ParentRunner<ScenarioSpec> {
@@ -192,8 +194,8 @@ public class ZeroCodePackageRunner extends ParentRunner<ScenarioSpec> {
 
         serverEnv = getEnvSpecificConfigFile(serverEnv, testClass);
 
-        Class<? extends BasicHttpClient> runtimeHttpClient = getCustomHttpClientOrDefault(testClass);
-        Class<? extends BasicKafkaClient> runtimeKafkaClient = getCustomKafkaClientOrDefault(testClass);
+        Class<? extends BasicHttpClient> runtimeHttpClient = createCustomHttpClientOrDefault();
+        Class<? extends BasicKafkaClient> runtimeKafkaClient = createCustomKafkaClientOrDefault();
 
         return createInjector(Modules.override(new ApplicationMainModule(serverEnv))
                 .with(
@@ -222,6 +224,16 @@ public class ZeroCodePackageRunner extends ParentRunner<ScenarioSpec> {
         this.zeroCodeMultiStepsScenarioRunner = zeroCodeMultiStepsScenarioRunner;
     }
 
+    public Class<? extends BasicKafkaClient> createCustomKafkaClientOrDefault() {
+        final UseKafkaClient kafkaClientAnnotated = testClass.getAnnotation(UseKafkaClient.class);
+        return kafkaClientAnnotated != null ? kafkaClientAnnotated.value() : ZerocodeCustomKafkaClient.class;
+    }
+
+    public Class<? extends BasicHttpClient> createCustomHttpClientOrDefault() {
+        final UseHttpClient httpClientAnnotated = testClass.getAnnotation(UseHttpClient.class);
+        return httpClientAnnotated != null ? httpClientAnnotated.value() : SslTrustHttpClient.class;
+    }
+
     private ZeroCodeMultiStepsScenarioRunner getInjectedMultiStepsRunner() {
         zeroCodeMultiStepsScenarioRunner = getMainModuleInjector().getInstance(ZeroCodeMultiStepsScenarioRunner.class);
         return zeroCodeMultiStepsScenarioRunner;
diff --git a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
index cc25cffd..a51432aa 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/runner/ZeroCodeUnitRunner.java
@@ -16,11 +16,15 @@ import org.jsmart.zerocode.core.domain.JsonTestCase;
 import org.jsmart.zerocode.core.domain.Scenario;
 import org.jsmart.zerocode.core.domain.ScenarioSpec;
 import org.jsmart.zerocode.core.domain.TargetEnv;
+import org.jsmart.zerocode.core.domain.UseHttpClient;
+import org.jsmart.zerocode.core.domain.UseKafkaClient;
 import org.jsmart.zerocode.core.domain.builders.ZeroCodeExecReportBuilder;
 import org.jsmart.zerocode.core.domain.builders.ZeroCodeIoWriteBuilder;
 import org.jsmart.zerocode.core.engine.listener.ZeroCodeTestReportListener;
 import org.jsmart.zerocode.core.httpclient.BasicHttpClient;
+import org.jsmart.zerocode.core.httpclient.ssl.SslTrustHttpClient;
 import org.jsmart.zerocode.core.kafka.client.BasicKafkaClient;
+import org.jsmart.zerocode.core.kafka.client.ZerocodeCustomKafkaClient;
 import org.jsmart.zerocode.core.logbuilder.ZerocodeCorrelationshipLogger;
 import org.jsmart.zerocode.core.report.ZeroCodeReportGenerator;
 import org.jsmart.zerocode.core.utils.SmartUtils;
@@ -42,8 +46,6 @@ import static java.lang.System.getProperty;
 import static org.jsmart.zerocode.core.constants.ZeroCodeReportConstants.CHARTS_AND_CSV;
 import static org.jsmart.zerocode.core.constants.ZeroCodeReportConstants.ZEROCODE_JUNIT;
 import static org.jsmart.zerocode.core.domain.builders.ZeroCodeExecReportBuilder.newInstance;
-import static org.jsmart.zerocode.core.utils.RunnerUtils.getCustomHttpClientOrDefault;
-import static org.jsmart.zerocode.core.utils.RunnerUtils.getCustomKafkaClientOrDefault;
 import static org.jsmart.zerocode.core.utils.RunnerUtils.getEnvSpecificConfigFile;
 
 public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
@@ -154,8 +156,8 @@ public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
 
             serverEnv = getEnvSpecificConfigFile(serverEnv, testClass);
 
-            Class<? extends BasicHttpClient> runtimeHttpClient = getCustomHttpClientOrDefault(testClass);
-            Class<? extends BasicKafkaClient> runtimeKafkaClient = getCustomKafkaClientOrDefault(testClass);
+            Class<? extends BasicHttpClient> runtimeHttpClient = createCustomHttpClientOrDefault();
+            Class<? extends BasicKafkaClient> runtimeKafkaClient = createCustomKafkaClientOrDefault();
 
             injector = Guice.createInjector(Modules.override(new ApplicationMainModule(serverEnv))
                     .with(
@@ -168,6 +170,20 @@ public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
         }
     }
 
+    public Class<? extends BasicKafkaClient> createCustomKafkaClientOrDefault() {
+        final UseKafkaClient kafkaClientAnnotated = testClass.getAnnotation(UseKafkaClient.class);
+        return kafkaClientAnnotated != null ? kafkaClientAnnotated.value() : ZerocodeCustomKafkaClient.class;
+    }
+
+    public Class<? extends BasicHttpClient> createCustomHttpClientOrDefault() {
+        final UseHttpClient httpClientAnnotated = getUseHttpClient();
+        return httpClientAnnotated != null ? httpClientAnnotated.value() : SslTrustHttpClient.class;
+    }
+
+    public UseHttpClient getUseHttpClient() {
+        return testClass.getAnnotation(UseHttpClient.class);
+    }
+
     /**
      * Override this for Junit custom lister handling.
      * End User experience can be enhanced via this
@@ -368,4 +384,5 @@ public class ZeroCodeUnitRunner extends BlockJUnit4ClassRunner {
         return jsonTestCase.value() == null ? null : jsonTestCase;
     }
 
+
 }
diff --git a/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/LoadProcessor.java b/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/LoadProcessor.java
index 1fca8fa5..881e72c7 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/LoadProcessor.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/LoadProcessor.java
@@ -1,6 +1,9 @@
 package org.jsmart.zerocode.core.runner.parallel;
 
+import ch.qos.logback.classic.Level;
+import ch.qos.logback.classic.LoggerContext;
 import java.util.concurrent.atomic.AtomicInteger;
+import org.jsmart.zerocode.core.utils.EnvUtils;
 import org.jsmart.zerocode.parallel.ExecutorServiceRunner;
 import org.junit.runner.JUnitCore;
 import org.junit.runner.Request;
@@ -9,9 +12,12 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static java.time.LocalDateTime.now;
+import static org.jsmart.zerocode.core.constants.ZeroCodeReportConstants.TARGET_FULL_REPORT_CSV_FILE_NAME;
 
 public class LoadProcessor {
     private static final Logger LOGGER = LoggerFactory.getLogger(LoadProcessor.class);
+    public static final String LOGLEVEL = "loglevel";
+    public static final String DEFAULT_LOAD_LOGGING_LEVEL = "INFO";
 
     private final String loadPropertiesFile;
 
@@ -24,7 +30,8 @@ public class LoadProcessor {
 
     public LoadProcessor(String loadPropertiesFile) {
         this.loadPropertiesFile = loadPropertiesFile;
-        executorServiceRunner = new ExecutorServiceRunner(loadPropertiesFile);
+        this.executorServiceRunner = createExecutorServiceRunner();
+        updateLoggingLevel();
     }
 
     public ExecutorServiceRunner getExecutorServiceRunner() {
@@ -39,6 +46,14 @@ public class LoadProcessor {
         return failedCounter;
     }
 
+    public String getLoadPropertiesFile() {
+        return loadPropertiesFile;
+    }
+
+    public ExecutorServiceRunner createExecutorServiceRunner() {
+        return new ExecutorServiceRunner(getLoadPropertiesFile());
+    }
+
     public LoadProcessor addTest(Class<?> testClass, String testMethod) {
 
         Runnable zeroCodeJunitTest = createRunnable(testClass, testMethod);
@@ -51,13 +66,21 @@ public class LoadProcessor {
     public boolean process() {
         executorServiceRunner.runRunnables();
 
-        LOGGER.info(
+        LOGGER.debug(
                 "\n------------------------------------"
                         + "\n   >> Total load test count:" + (failedCounter.get() + passedCounter.get())
                         + "\n   >> Passed count:" + passedCounter.get()
                         + "\n   >> Failed count:" + failedCounter.get()
                         + "\n------------------------------------");
 
+        LOGGER.warn(
+                "\n-----------------------------------------------------------------------------------------------------------" +
+                "\n==>> Completed this load-run!" +
+                "\n==>> Number of load tests ran : " + (failedCounter.get() + passedCounter.get()) +
+                "\n==>> View the detailed performance results in the 'target/" + TARGET_FULL_REPORT_CSV_FILE_NAME + "' folder." +
+                "\n-----------------------------------------------------------------------------------------------------------\n\n"
+        );
+
         if (failedCounter.get() > 0) {
             return failed;
         }
@@ -68,13 +91,21 @@ public class LoadProcessor {
     public boolean processMultiLoad() {
         executorServiceRunner.runRunnablesMulti();
 
-        LOGGER.info(
+        LOGGER.debug(
                 "\n------------------------------------"
                         + "\n   >> Total load test count:" + (failedCounter.get() + passedCounter.get())
                         + "\n   >> Passed count:" + passedCounter.get()
                         + "\n   >> Failed count:" + failedCounter.get()
                         + "\n------------------------------------");
 
+        LOGGER.warn(
+                "\n-----------------------------------------------------------------------------------------------------------" +
+                        "\n==>> Completed this load-run!" +
+                        "\n==>> Number of load tests ran : " + (failedCounter.get() + passedCounter.get()) +
+                        "\n==>> View the detailed performance results in the 'target/" + TARGET_FULL_REPORT_CSV_FILE_NAME + "' folder." +
+                        "\n-----------------------------------------------------------------------------------------------------------\n\n"
+        );
+
         if (failedCounter.get() > 0) {
             return failed;
         }
@@ -98,4 +129,12 @@ public class LoadProcessor {
         };
     }
 
+    private void updateLoggingLevel() {
+        String loggingLevel = EnvUtils.getEnvValueString(LOGLEVEL);
+        loggingLevel = loggingLevel != null ? loggingLevel : DEFAULT_LOAD_LOGGING_LEVEL;
+        LOGGER.warn("Logging level has been set to:{}, to change this use: '{}'", loggingLevel, "-Dloglevel=<WARN or INFO or DEBUG etc>");
+        LoggerContext loggerContext = (LoggerContext) LoggerFactory.getILoggerFactory();
+        ch.qos.logback.classic.Logger logger = loggerContext.getLogger("org.jsmart.zerocode.core");
+        logger.setLevel(Level.toLevel(loggingLevel));
+    }
 }
diff --git a/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/ZeroCodeLoadRunner.java b/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/ZeroCodeLoadRunner.java
index 7981fa98..5d7b0f74 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/ZeroCodeLoadRunner.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/runner/parallel/ZeroCodeLoadRunner.java
@@ -21,6 +21,7 @@ public class ZeroCodeLoadRunner extends ParentRunner<TestMapping> {
 
     private final Class<?> testClass;
     private LoadProcessor loadProcessor;
+
     private String loadPropertiesFile;
     private Description testDescription;
 
@@ -28,7 +29,11 @@ public class ZeroCodeLoadRunner extends ParentRunner<TestMapping> {
         super(testClass);
         this.testClass = testClass;
         this.loadPropertiesFile = validateAndGetLoadPropertiesFile();
-        loadProcessor = new LoadProcessor(loadPropertiesFile);
+        loadProcessor = createLoadProcessor();
+    }
+
+    public LoadProcessor createLoadProcessor() {
+        return new LoadProcessor(loadPropertiesFile);
     }
 
     @Override
@@ -65,6 +70,10 @@ public class ZeroCodeLoadRunner extends ParentRunner<TestMapping> {
         super.run(notifier);
     }
 
+    public String getLoadPropertiesFile() {
+        return loadPropertiesFile;
+    }
+
     private String validateAndGetLoadPropertiesFile() {
         LoadWith loadWithAnno = testClass.getAnnotation(LoadWith.class);
         if(loadWithAnno == null){
diff --git a/core/src/main/java/org/jsmart/zerocode/core/utils/EnvUtils.java b/core/src/main/java/org/jsmart/zerocode/core/utils/EnvUtils.java
new file mode 100644
index 00000000..75451111
--- /dev/null
+++ b/core/src/main/java/org/jsmart/zerocode/core/utils/EnvUtils.java
@@ -0,0 +1,18 @@
+package org.jsmart.zerocode.core.utils;
+
+import static java.lang.Integer.parseInt;
+import static java.lang.System.getProperty;
+import static java.lang.System.getenv;
+
+public class EnvUtils {
+
+    public static Integer getEnvValueInt(String envKey) {
+        String envValue = getProperty(envKey) == null ? getenv(envKey) : getProperty(envKey);
+        return envValue == null ? null : parseInt(envValue);
+    }
+
+    public static String getEnvValueString(String envKey) {
+        return getProperty(envKey) == null ? getenv(envKey) : getProperty(envKey);
+    }
+
+}
diff --git a/core/src/main/java/org/jsmart/zerocode/core/utils/RunnerUtils.java b/core/src/main/java/org/jsmart/zerocode/core/utils/RunnerUtils.java
index a0f87295..2ade125e 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/utils/RunnerUtils.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/utils/RunnerUtils.java
@@ -134,17 +134,4 @@ public class RunnerUtils {
                 (csvSource != null ? csvSource.size() : 0);
     }
 
-
-    public static Class<? extends BasicKafkaClient> getCustomKafkaClientOrDefault(Class<?> testClass) {
-        final UseKafkaClient kafkaClientAnnotated = testClass.getAnnotation(UseKafkaClient.class);
-        return kafkaClientAnnotated != null ? kafkaClientAnnotated.value() : ZerocodeCustomKafkaClient.class;
-    }
-
-    public static Class<? extends BasicHttpClient> getCustomHttpClientOrDefault(Class<?> testClass) {
-        final UseHttpClient httpClientAnnotated = testClass.getAnnotation(UseHttpClient.class);
-        return httpClientAnnotated != null ? httpClientAnnotated.value() : SslTrustHttpClient.class;
-    }
-
-
-
 }
diff --git a/core/src/main/java/org/jsmart/zerocode/parallel/ExecutorServiceRunner.java b/core/src/main/java/org/jsmart/zerocode/parallel/ExecutorServiceRunner.java
index 0846a1ac..30f14027 100644
--- a/core/src/main/java/org/jsmart/zerocode/parallel/ExecutorServiceRunner.java
+++ b/core/src/main/java/org/jsmart/zerocode/parallel/ExecutorServiceRunner.java
@@ -147,7 +147,7 @@ public class ExecutorServiceRunner {
                 // --------------------------------------
                 //LOGGER.info("Still waiting for all threads to complete execution...");
             }
-            LOGGER.info("**Finished executing all threads**");
+            LOGGER.warn("** Completed executing all virtual-user scenarios! **");
         }
     }
 
@@ -188,7 +188,7 @@ public class ExecutorServiceRunner {
                 // wait for all tasks to finish executing
                 // LOGGER.info("Still waiting for all threads to complete execution...");
             }
-            LOGGER.info("Finished all threads");
+            LOGGER.warn("* Completed executing all virtual-user scenarios! *");
         }
 
 
@@ -236,7 +236,7 @@ public class ExecutorServiceRunner {
     }
 
     private void logLoadingProperties() {
-        LOGGER.info(
+        LOGGER.warn(
                 "\nLOAD:" +
                 "\n-----------------------------------" +
                 "\n   ### numberOfThreads : " + numberOfThreads +


Test patch:
diff --git a/core/src/main/java/org/jsmart/zerocode/core/engine/listener/ZeroCodeTestReportListener.java b/core/src/main/java/org/jsmart/zerocode/core/engine/listener/ZeroCodeTestReportListener.java
index 0ff2bf33..0751a636 100644
--- a/core/src/main/java/org/jsmart/zerocode/core/engine/listener/ZeroCodeTestReportListener.java
+++ b/core/src/main/java/org/jsmart/zerocode/core/engine/listener/ZeroCodeTestReportListener.java
@@ -35,12 +35,16 @@ public class ZeroCodeTestReportListener extends RunListener {
         /*
          * Called when all tests have finished
          */
-        LOGGER.info("#ZeroCode: Test run completed for this runner. Generating test reports and charts. " +
-                "\n* For more examples, helps, Kafka streams, APIs and Load use-cases visit https://zerocode.io");
+        printTestCompleted();
         generateChartsAndReports();
         runPostFinished();
     }
 
+    private void printTestCompleted() {
+        LOGGER.info("#ZeroCode: Test run completed for this runner. Generating test reports and charts. " +
+                "\n* For more examples and help on automated Kafka data stream testing and Load testing visit https://zerocode.io");
+    }
+
     /**
      * Override this to handle post-finished tasks
      */
diff --git a/core/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java b/core/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
index a047007c..953aa30b 100644
--- a/core/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
+++ b/core/src/test/java/org/jsmart/zerocode/core/tests/customrunner/TestOnlyZeroCodeUnitRunner.java
@@ -1,6 +1,8 @@
 package org.jsmart.zerocode.core.tests.customrunner;
 
 import org.jsmart.simulator.main.SimpleRestJsonSimulatorsMain;
+import org.jsmart.zerocode.core.httpclient.BasicHttpClient;
+import org.jsmart.zerocode.core.httpclient.ssl.SslTrustHttpClient;
 import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
 import org.junit.runners.model.InitializationError;
 
@@ -22,4 +24,9 @@ public class TestOnlyZeroCodeUnitRunner extends ZeroCodeUnitRunner {
     public TestOnlyZeroCodeUnitRunner(Class<?> klass) throws InitializationError {
         super(klass);
     }
+
+    public Class<? extends BasicHttpClient> createCustomHttpClientOrDefault() {
+        return getUseHttpClient() == null? SslTrustHttpClient.class : getUseHttpClient().value();
+    }
+
 }
diff --git a/core/src/test/java/org/jsmart/zerocode/core/utils/EnvUtilsTest.java b/core/src/test/java/org/jsmart/zerocode/core/utils/EnvUtilsTest.java
new file mode 100644
index 00000000..e9f48f81
--- /dev/null
+++ b/core/src/test/java/org/jsmart/zerocode/core/utils/EnvUtilsTest.java
@@ -0,0 +1,33 @@
+package org.jsmart.zerocode.core.utils;
+
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.jsmart.zerocode.core.utils.EnvUtils.getEnvValueInt;
+import static org.jsmart.zerocode.core.utils.EnvUtils.getEnvValueString;
+import static org.junit.Assert.*;
+
+public class EnvUtilsTest {
+
+    @Test
+    public void test_getEnvValue_int() {
+        System.setProperty("users", "5");
+        Integer users = getEnvValueInt("users");
+        assertThat(users, is(5));
+    }
+
+    @Test
+    public void test_getEnvValue_string() {
+        System.setProperty("users", "5");
+        String users = getEnvValueString("users");
+        assertThat(users, is("5"));
+    }
+
+    @Test
+    public void test_getEnvValue_notYetSet() {
+        //System.setProperty("users", "5"); //not set
+        Integer users = getEnvValueInt("users");
+        assertThat(users == null, is(true));
+    }
+
+}
\ No newline at end of file
diff --git a/http-testing/src/test/java/org/jsmart/zerocode/testhelp/tests/loadtesting/restendpoint/TestGitGubEndPoint.java b/http-testing/src/test/java/org/jsmart/zerocode/testhelp/tests/loadtesting/restendpoint/TestGitGubEndPoint.java
index 3e72995f..6b306df2 100644
--- a/http-testing/src/test/java/org/jsmart/zerocode/testhelp/tests/loadtesting/restendpoint/TestGitGubEndPoint.java
+++ b/http-testing/src/test/java/org/jsmart/zerocode/testhelp/tests/loadtesting/restendpoint/TestGitGubEndPoint.java
@@ -1,7 +1,7 @@
 package org.jsmart.zerocode.testhelp.tests.loadtesting.restendpoint;
 
 import org.jsmart.zerocode.core.domain.HostProperties;
-import org.jsmart.zerocode.core.domain.JsonTestCase;
+import org.jsmart.zerocode.core.domain.Scenario;
 import org.jsmart.zerocode.core.domain.UseHttpClient;
 import org.jsmart.zerocode.core.httpclient.ssl.SslTrustHttpClient;
 import org.jsmart.zerocode.core.runner.ZeroCodeUnitRunner;
@@ -14,7 +14,7 @@ import org.junit.runner.RunWith;
 public class TestGitGubEndPoint {
 
     @Test
-    @JsonTestCase("loadtesting/github_get_api_test_case.json")
+    @Scenario("loadtesting/github_get_api_test_case.json")
     public void testGitHubGET_load() throws Exception {
 
     }
diff --git a/http-testing/src/test/resources/load_config_sample.properties b/http-testing/src/test/resources/load_config_sample.properties
index 66f1dcc0..08407262 100755
--- a/http-testing/src/test/resources/load_config_sample.properties
+++ b/http-testing/src/test/resources/load_config_sample.properties
@@ -19,7 +19,3 @@ ramp.up.period.in.seconds=10
 # fired in 60 seconds which means- every request in 4 seconds gap. 60/15 or 20/5 = 4seconds.
 loop.count=1
 
-# If you have set the loop count to a higher digit which e.g. should take 3hrs(3*60*60=10800sec),
-# but due to load or network delay it could take more time(you are speculating) e.g. 4hrs, then you can
-# set this abort value to 3hrs i.e. 3*60*60=10800sec.
-abort.after.time.lapsed.in.seconds=600
\ No newline at end of file
diff --git a/http-testing/src/test/resources/logback.xml b/http-testing/src/test/resources/logback.xml
new file mode 100644
index 00000000..65eef84e
--- /dev/null
+++ b/http-testing/src/test/resources/logback.xml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration>
+    <appender name="fileAppender" class="ch.qos.logback.core.FileAppender">
+        <file>target/logs/your_app_tests_logs.log</file>
+        <append>true</append>
+        <encoder>
+            <pattern>%d [%thread] %-5level %logger{100} - %msg%n</pattern>
+        </encoder>
+    </appender>
+
+    <appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
+        <!--<encoder>
+            <pattern>%d [%thread] %-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
+        </encoder>-->
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <!--<pattern>%d %green([%thread]) %highlight(%level) %logger{100} - %blue(%msg%n)</pattern>-->
+            <pattern>%d [%thread] %-5level %logger{100} - %msg%n</pattern>
+        </layout>
+    </appender>
+
+    <root level="INFO"> <!-- Change this value to have or prevent verbose outputs e.g. WARN or DEBUG -->
+        <appender-ref ref="fileAppender" />
+        <appender-ref ref="consoleAppender" />
+    </root>
+</configuration>
\ No newline at end of file
diff --git a/kafka-testing/src/test/resources/kafka/consume/test_kafka_consume_raw_msg.json b/kafka-testing/src/test/resources/kafka/consume/test_kafka_consume_raw_msg.json
index 63427708..3bc68c76 100755
--- a/kafka-testing/src/test/resources/kafka/consume/test_kafka_consume_raw_msg.json
+++ b/kafka-testing/src/test/resources/kafka/consume/test_kafka_consume_raw_msg.json
@@ -4,7 +4,7 @@
         {
             "name": "load_kafka",
             "url": "kafka-topic:demo-raw1",
-            "operation": "load",
+            "operation": "PRODUCE",
             "request": {
                 "records": [
                     {
@@ -20,7 +20,7 @@
         {
             "name": "onload_kafka",
             "url": "kafka-topic:demo-raw1",
-            "operation": "unload",
+            "operation": "CONSUME",
             "request": {
                 "consumerLocalConfigs": {
                     "recordType": "RAW",