Code Monkey home page Code Monkey logo

test2code-plugin's Introduction

DISCLAIMER: We use Google Analytics for sending anonymous usage information such as total time saved by tests. This information might help us to improve both Drill4J backend and client sides. It is used by the Drill4J team only and is not supposed for sharing with 3rd parties. You are able to turn off by set system property analytic.disable = true or send PATCH request /api/analytic/toggle.

Check Release License Visit the website at drill4j.github.io Telegram Chat GitHub release (latest by date) GitHub contributors Lines of code YouTube Channel Views

Test2Code Plugin Overview

Minimize your regression suite via Test Impact Analytics. For more information see in documentation or core concepts

Modules

  • benchmarks: Module with benchmark tests
  • jacoco: Library with extended functionality for JaCoCo
  • load-tests: Module with load tests
  • plugin-runner: Module with scripts for local run by task ':plugin-runner:run'
  • test2code-admin: Classes for working with admin. It analyzes probes and send metrics & statistics.
  • test2code-agent: Classes for working with java-agent. Probes are put down with the help of instrumentation in the source code and sends to test2code-admin
  • test2code-common: Classes for working with java-agent. Probes are put down with the help of instrumentation in the source code and sends to test2code-admin
  • tests: Module with tests

test2code-plugin's People

Contributors

adenmin avatar alekseytikhomirov avatar bodyangug avatar denisdomashenko avatar epamrsa avatar igorkey avatar iryabov avatar kir-r avatar likhanovmaxim avatar mazel-tovr avatar patsevanton avatar romandavlyatshin avatar s0larm00n avatar viktorbll avatar

Stargazers

 avatar

Watchers

 avatar

test2code-plugin's Issues

Unclear on how to add Test2Code plugin

Hi, I've been following the documentation as stated https://drill4j.github.io/how-to-start/, I'm using the sample Sprint boot application PetClinic as example agent, Till step 3 i had no problem.. I see the application is running on port 8080 and on 8091 the admin panel is there.. now in Step 4 do i need to add the browser extension in order to add the Test2Code plugin or is it fine if I don't ?

Can you help me understand this ? Thank you

checksum issue while running the tests

[INFO] Scanning for projects...
[INFO]
[INFO] -------------------< TestFramework:RESTAssuredTest >--------------------
[INFO] Building RESTAssuredTest 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from : https://drill4j.jfrog.io/artifactory/drill/org/apache/maven/plugins/maven-install-plugin/2.4/maven-install-plugin-2.4.pom
[WARNING] Checksum validation failed: Checksum validation failed, expected [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

Java 17. Unsupported class file major version 61

Problem with jdk 17.
Error:

java.io.IOException: Error while analyzing com/mkyong/HelloController.
        at com.epam.drill.plugins.test2code.shadow.org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:162)
        at com.epam.drill.plugins.test2code.shadow.org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:134)
        at com.epam.drill.plugins.test2code.jvm.JacocoExtKt$bundle$2.invoke(JacocoExt.kt:53)
        at com.epam.drill.plugins.test2code.jvm.JacocoExtKt$bundle$2.invoke(JacocoExt.kt)
        at com.epam.drill.plugins.test2code.jvm.JacocoExtKt.bundle(JacocoExt.kt:62)
        at com.epam.drill.plugins.test2code.jvm.JacocoExtKt.bundle(JacocoExt.kt:52)
        at com.epam.drill.plugins.test2code.AgentState.initialized(State.kt:123)
        at com.epam.drill.plugins.test2code.Plugin.processData(Plugin.kt:239)
        at com.epam.drill.plugins.test2code.Plugin.processData(Plugin.kt:218)
        at com.epam.drill.admin.endpoints.plugin.PluginDispatcher.processPluginData(PluginDispatcher.kt:76)
        at com.epam.drill.admin.endpoints.agent.AgentHandler$createWsLoop$$inlined$consumeEach$lambda$4.invokeSuspend(AgentHandler.kt:105)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 61
        at com.epam.drill.plugins.test2code.shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
        at com.epam.drill.plugins.test2code.shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
        at com.epam.drill.plugins.test2code.shadow.org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
        at com.epam.drill.plugins.test2code.shadow.org.jacoco.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
        at com.epam.drill.plugins.test2code.shadow.org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:107)
        at com.epam.drill.plugins.test2code.shadow.org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:132)
        ... 15 common frames omitted

Reproducing:
Setup java 17 for build.
Create app on jdk 17 (for testing I get open hello world).
https://github.com/mkyong/spring-boot/tree/master/spring-boot-hello-world

mvn clean install

Create image for docker-compose testing:
Add to folder Dokcerfile

FROM openjdk
ARG JAR_FILE=target/*.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar"]

Create image

docker run --rm -p 8080:8080 spring_hello

Create docker-compose file:

version: '3.9'

services:
  admin-ui:
    image: drill4j/admin-ui:0.8.0-alpha
    ports:
      - "8091:8080"

  drill-admin:
    image: drill4j/admin:0.8.0-alpha.1
    environment:
      - TEST2CODE_PLUGIN_VERSION=0.8.0-alpha.1
      - LOG_LEVEL=INFO
    ports:
      - "8090:8090"

  agent-files:
    image: drill4j/java-agent:0.8.0-alpha.1
    volumes:
      - agent-files:/data

  spring_hello:
    image: spring_hello:latest
    ports:
      - "8080:8080"
    environment:
      - "JAVA_TOOL_OPTIONS=-agentpath:/data/agent/libdrill_agent.so=drillInstallationDir=/data/agent,adminAddress=host.docker.internal:8090,agentId=SpringHello,buildVersion=0.1.0,logLevel=INFO"
    volumes:
      - agent-files:/data

volumes:
  agent-files:

Run compose (rerun command if spring doesnt start. (volume should be create before)

docker-compose up -d

Open drill UI, setup configuration. (1st point: plugin doesnt find any code/functions)
Open localhost:8080 and check spring application.
Use extension for running manual test. (Do few execs and finish test).
Check drill drill-admin logs (docker logs ... drill-admin_1_container_name).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.