From e37311f876680da8256519f055bee91750e49d50 Mon Sep 17 00:00:00 2001 From: Sarthak Shyngle <50234097+sarthak160@users.noreply.github.com> Date: 2023年1月16日 13:55:07 +0530 Subject: [PATCH] feat: add method to run keploy binary on 6789 port in test mode Signed-off-by: Sarthak Shyngle <50234097+sarthak160@users.noreply.github.com> --- .../src/main/java/io/keploy/agent/KAgent.java | 59 +++++- .../keploy/httpClients/ApacheInterceptor.java | 2 +- .../io/keploy/servlet/KeployMiddleware.java | 8 +- .../701f5e54-c6d9-4e9f-a062-a82c2460af48.yaml | 188 ++++++++++++++++++ .../b2e20e21-d3d7-457b-940c-f63270410456.yaml | 188 ++++++++++++++++++ .../dff3991d-7473-44c8-964c-85d6d19e80b3.yaml | 188 ++++++++++++++++++ 6 files changed, 627 insertions(+), 6 deletions(-) create mode 100644 test-reports/701f5e54-c6d9-4e9f-a062-a82c2460af48.yaml create mode 100644 test-reports/b2e20e21-d3d7-457b-940c-f63270410456.yaml create mode 100644 test-reports/dff3991d-7473-44c8-964c-85d6d19e80b3.yaml diff --git a/agent/src/main/java/io/keploy/agent/KAgent.java b/agent/src/main/java/io/keploy/agent/KAgent.java index 46c7afa1..f1a75133 100644 --- a/agent/src/main/java/io/keploy/agent/KAgent.java +++ b/agent/src/main/java/io/keploy/agent/KAgent.java @@ -13,23 +13,30 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; import java.lang.instrument.Instrumentation; import java.lang.reflect.Field; +import java.net.ConnectException; +import java.net.Socket; import java.sql.DatabaseMetaData; import java.util.Collections; -import java.util.HashMap; import java.util.Map; import java.util.Objects; - +import static io.keploy.servlet.KeployMiddleware.process; import static net.bytebuddy.matcher.ElementMatchers.*; public class KAgent { + private static final Logger logger = LogManager.getLogger(KAgent.class); public static void premain(String arg, Instrumentation instrumentation) { + StartKeploy(); + logger.debug("inside premain method"); logger.debug("KeployMode:{}", System.getenv("KEPLOY_MODE")); if (System.getenv("KEPLOY_MODE") != null && Objects.equals(System.getenv("KEPLOY_MODE"), "off")) { @@ -216,6 +223,54 @@ public static void premain(String arg, Instrumentation instrumentation) { .installOn(instrumentation); } + private static void StartKeploy() { + if (!IsPortBusy()) { + System.out.println("inside init !!"); + new Thread(() -> { + try { + ProcessBuilder pb = new ProcessBuilder("/usr/local/bin/keploy", "keploy"); + process = pb.start(); + + BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); + String line; + while ((line = reader.readLine()) != null) { + System.out.println(line); + } + + int exitCode = process.waitFor(); + System.out.println("\nExited with error code : " + exitCode); + } catch (IOException e) { + e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); + } + }).start(); + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + throw new RuntimeException(e); + } + } + } + + public static boolean IsPortBusy() { + String host = "localhost"; + int port = 6789; + + try { + Socket socket = new Socket(host, port); + System.out.println("Port " + port + " is busy."); + socket.close(); + return true; + } catch (ConnectException e) { + System.out.println("Port " + port + " is not in use."); + return false; + } catch (Exception e) { + e.printStackTrace(); + } + return false; + } + private static boolean isJUnitTest() { for (StackTraceElement element : Thread.currentThread().getStackTrace()) { if (element.getClassName().startsWith("org.junit.")) { diff --git a/integration/src/main/java/io/keploy/httpClients/ApacheInterceptor.java b/integration/src/main/java/io/keploy/httpClients/ApacheInterceptor.java index 805731a4..8fbfba27 100644 --- a/integration/src/main/java/io/keploy/httpClients/ApacheInterceptor.java +++ b/integration/src/main/java/io/keploy/httpClients/ApacheInterceptor.java @@ -5,9 +5,9 @@ import io.keploy.grpc.stubs.Service; import io.keploy.regression.KeployInstance; import io.keploy.regression.Mock; +import io.keploy.regression.Mode; import io.keploy.regression.context.Context; import io.keploy.regression.context.Kcontext; -import io.keploy.regression.Mode; import io.keploy.regression.keploy.Keploy; import io.keploy.service.GrpcService; import io.keploy.utils.MagicBytes; diff --git a/integration/src/main/java/io/keploy/servlet/KeployMiddleware.java b/integration/src/main/java/io/keploy/servlet/KeployMiddleware.java index b0d44326..8de38c55 100644 --- a/integration/src/main/java/io/keploy/servlet/KeployMiddleware.java +++ b/integration/src/main/java/io/keploy/servlet/KeployMiddleware.java @@ -3,13 +3,13 @@ import io.grpc.netty.shaded.io.netty.util.internal.InternalThreadLocalMap; import io.keploy.grpc.stubs.Service; import io.keploy.regression.KeployInstance; +import io.keploy.regression.Mode; import io.keploy.regression.context.Context; import io.keploy.regression.context.Kcontext; import io.keploy.regression.keploy.AppConfig; import io.keploy.regression.keploy.Config; import io.keploy.regression.keploy.Keploy; import io.keploy.regression.keploy.ServerConfig; -import io.keploy.regression.Mode; import io.keploy.service.GrpcService; import io.keploy.utils.*; import lombok.SneakyThrows; @@ -35,7 +35,7 @@ public class KeployMiddleware implements Filter { private static final Logger logger = LogManager.getLogger(KeployMiddleware.class); private static final String CROSS = new String(Character.toChars(0x274C)); - + public static Process process = null; @Override public void init(FilterConfig filterConfig) { //just like wait groups, used in testfile @@ -145,7 +145,9 @@ public void init(FilterConfig filterConfig) { } catch (InterruptedException e) { logger.error(CROSS + " failed to shut grpc connection properly... ", e); } - + if (process != null) { + process.destroy(); + } try { Thread.sleep(10000); System.exit(0); diff --git a/test-reports/701f5e54-c6d9-4e9f-a062-a82c2460af48.yaml b/test-reports/701f5e54-c6d9-4e9f-a062-a82c2460af48.yaml new file mode 100644 index 00000000..c1045649 --- /dev/null +++ b/test-reports/701f5e54-c6d9-4e9f-a062-a82c2460af48.yaml @@ -0,0 +1,188 @@ +name: 701f5e54-c6d9-4e9f-a062-a82c2460af48 +status: FAILED +success: 3 +failure: 1 +total: 4 +tests: + - name: 701f5e54-c6d9-4e9f-a062-a82c2460af48 + status: PASSED + started: 1673717441 + completed: 1673717441 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-1 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "102" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Shubham", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-1-0 + resp: + status_code: 200 + header: {} + body: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700}' + actual: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + dep_result: [] + - name: 701f5e54-c6d9-4e9f-a062-a82c2460af48 + status: PASSED + started: 1673717441 + completed: 1673717441 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-2 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-2-0 + resp: + status_code: 200 + header: {} + body: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914}' + actual: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + dep_result: [] + - name: 701f5e54-c6d9-4e9f-a062-a82c2460af48 + status: PASSED + started: 1673717441 + completed: 1673717441 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-3 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-3-0 + resp: + status_code: 200 + header: {} + body: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}' + actual: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717441}' + dep_result: [] + - name: 701f5e54-c6d9-4e9f-a062-a82c2460af48 + status: FAILED + started: 1673717442 + completed: 1673717442 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-4 + req: + method: GET + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + host: localhost:8080 + user-agent: curl/7.78.0 + body: "" + mocks: + - test-4-0 + resp: + status_code: 200 + header: {} + body: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Sarthak","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + status_message: OK + proto_major: 1 + proto_minor: 1 + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: false + type: JSON + expected: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + actual: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Sarthak","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + dep_result: [] diff --git a/test-reports/b2e20e21-d3d7-457b-940c-f63270410456.yaml b/test-reports/b2e20e21-d3d7-457b-940c-f63270410456.yaml new file mode 100644 index 00000000..9b9441ac --- /dev/null +++ b/test-reports/b2e20e21-d3d7-457b-940c-f63270410456.yaml @@ -0,0 +1,188 @@ +name: b2e20e21-d3d7-457b-940c-f63270410456 +status: PASSED +success: 4 +failure: 0 +total: 4 +tests: + - name: b2e20e21-d3d7-457b-940c-f63270410456 + status: PASSED + started: 1673717262 + completed: 1673717262 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-1 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "102" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Shubham", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-1-0 + resp: + status_code: 200 + header: {} + body: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700}' + actual: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + dep_result: [] + - name: b2e20e21-d3d7-457b-940c-f63270410456 + status: PASSED + started: 1673717262 + completed: 1673717262 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-2 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-2-0 + resp: + status_code: 200 + header: {} + body: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914}' + actual: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + dep_result: [] + - name: b2e20e21-d3d7-457b-940c-f63270410456 + status: PASSED + started: 1673717262 + completed: 1673717262 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-3 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-3-0 + resp: + status_code: 200 + header: {} + body: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}' + actual: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717262}' + dep_result: [] + - name: b2e20e21-d3d7-457b-940c-f63270410456 + status: PASSED + started: 1673717262 + completed: 1673717262 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-4 + req: + method: GET + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + host: localhost:8080 + user-agent: curl/7.78.0 + body: "" + mocks: + - test-4-0 + resp: + status_code: 200 + header: {} + body: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + status_message: OK + proto_major: 1 + proto_minor: 1 + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + actual: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + dep_result: [] diff --git a/test-reports/dff3991d-7473-44c8-964c-85d6d19e80b3.yaml b/test-reports/dff3991d-7473-44c8-964c-85d6d19e80b3.yaml new file mode 100644 index 00000000..9732ba99 --- /dev/null +++ b/test-reports/dff3991d-7473-44c8-964c-85d6d19e80b3.yaml @@ -0,0 +1,188 @@ +name: dff3991d-7473-44c8-964c-85d6d19e80b3 +status: PASSED +success: 4 +failure: 0 +total: 4 +tests: + - name: dff3991d-7473-44c8-964c-85d6d19e80b3 + status: PASSED + started: 1673717600 + completed: 1673717600 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-1 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "102" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Shubham", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-1-0 + resp: + status_code: 200 + header: {} + body: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700}' + actual: '{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + dep_result: [] + - name: dff3991d-7473-44c8-964c-85d6d19e80b3 + status: PASSED + started: 1673717600 + completed: 1673717600 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-2 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-2-0 + resp: + status_code: 200 + header: {} + body: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914}' + actual: '{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + dep_result: [] + - name: dff3991d-7473-44c8-964c-85d6d19e80b3 + status: PASSED + started: 1673717600 + completed: 1673717600 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-3 + req: + method: POST + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + content-length: "100" + content-type: application/json + host: localhost:8080 + user-agent: curl/7.78.0 + body: |- + { + "firstName": "Ritik", + "lastName": "Jain", + "email": "rj@yahoo.com", + "timestamp":1 + } + mocks: + - test-3-0 + resp: + status_code: 200 + header: {} + body: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + status_message: OK + proto_major: 1 + proto_minor: 1 + noise: + - body.timestamp + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}' + actual: '{"id":3,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673717600}' + dep_result: [] + - name: dff3991d-7473-44c8-964c-85d6d19e80b3 + status: PASSED + started: 1673717600 + completed: 1673717600 + test_case_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/keploy-tests + mock_path: /Users/sarthak_1/Documents/Keploy/final/samples-java/src/test/e2e/mocks + test_case_id: test-4 + req: + method: GET + proto_major: 1 + proto_minor: 1 + url: /api/employees + header: + accept: '*/*' + host: localhost:8080 + user-agent: curl/7.78.0 + body: "" + mocks: + - test-4-0 + resp: + status_code: 200 + header: {} + body: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Sarthak","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + status_message: OK + proto_major: 1 + proto_minor: 1 + result: + status_code: + normal: true + expected: 200 + actual: 200 + headers_result: [] + body_result: + normal: true + type: JSON + expected: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Sarthak","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + actual: '[{"id":1,"firstName":"Shubham","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531700},{"id":2,"firstName":"Ritik","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673531914},{"id":3,"firstName":"Sarthak","lastName":"Jain","email":"rj@yahoo.com","timestamp":1673532452}]' + dep_result: []