RankWeis / uppercut

FREE Karate plugin for IntelliJ with additional features
Apache License 2.0
6 stars 0 forks source link

Log issue arises again #46

Closed calvario-31 closed 2 days ago

calvario-31 commented 2 days ago

Hi man, was testing v1.22 (from IntelliJ marketplace)

Sadly seems the log issue appeared again

0:16:44,361 |-INFO in ch.qos.logback.classic.util.ContextInitializer@64d2d351 - Trying to configure with ch.qos.logback.classic.util.DefaultJoranConfigurator
00:16:44,361 |-INFO in ch.qos.logback.classic.util.ContextInitializer@64d2d351 - Constructed configurator of type class ch.qos.logback.classic.util.DefaultJoranConfigurator
00:16:44,366 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/Users/calvario31/Documents/Projects/karate/karate-test/target/test-classes/logback-test.xml]
00:16:44,367 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@1b68b9a4 - Resource [logback-test.xml] occurs multiple times on the classpath.
00:16:44,367 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@1b68b9a4 - Resource [logback-test.xml] occurs at [file:/Users/calvario31/Documents/Projects/karate/karate-test/target/test-classes/logback-test.xml]
00:16:44,367 |-WARN in ch.qos.logback.classic.util.DefaultJoranConfigurator@1b68b9a4 - Resource [logback-test.xml] occurs at [jar:file:/Users/calvario31/Library/Application%20Support/JetBrains/IdeaIC2024.3/plugins/uppercut/lib/uppercut-1.2.2.jar!/logback-test.xml]

If I run using the karate runner the logs seems fine image

image

The issue is when pressing play on the Scenario image

image

Please let me know if you need more info or if Im doing something wrong

It works if I delete my local logback-test.xml so seems is related to the duplication

I believe this problem reappeared when I updated my intellij version to the latest. Im using: Build #IC-243.21565.193, built on November 12, 2024

RankWeis commented 2 days ago

Any chance you can show me your logback-test.xml? I'm working on a fix right now but am not fully able to reproduce the issue

RankWeis commented 2 days ago

uppercut-1.2.3-base.jar.zip

I believe this should fix the issue, I'm sending it out tonight but if you have time and experience any issues with it please let me know. This should address this and #47

RankWeis commented 2 days ago

Actually the fix was approved and is on live intelliJ, please check it out if you can!

calvario-31 commented 2 days ago

Hello,

Im using template/quickstart logback-test.xml you can build the project with these steps https://karatelabs.github.io/karate/#quickstart

this is the code for my logback-test.xml (is the default one haven't changed the code at all)

<?xml version="1.0" encoding="UTF-8"?>
<configuration>

    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <appender name="FILE" class="ch.qos.logback.core.FileAppender">
        <file>src/test/resources/karate.log</file>
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <logger name="com.intuit" level="DEBUG"/>

    <root level="info">
        <appender-ref ref="STDOUT"/>
        <appender-ref ref="FILE"/>
    </root>

</configuration>

Was testing 1.2.3 the error of duplicating does not appear when running the tests However, the log still not populate. I think the critical part is on the report we cannot see the info of the request

image

image

image

RankWeis commented 2 days ago

Ah, I see. I'm not entirely sure how the report is generated, but it does clearly use the logs from karate.log. Can you set the log level of the root level to 'debug' and see if that is better? It's a little noisy but may get you halfway there. Getting the report to generate is something I spent a bit of time on in my first pass developing this and I was unable to get it to be as good as running with the test suite. I'll spend some more time on it and see what I can do.

calvario-31 commented 2 days ago

Have tried to update root level to debug but still the same result It was working previously, maybe something you changed recently introduced this issue

RankWeis commented 2 days ago

Thanks for your patience. I do think I've got it working this time. Release should be out relatively soon but if you want the sneak peek it's here, otherwise please wait just a bit and we should have everything good from intellij's store. Thank you so much for your feedback as well, I only really know my own use cases for the plugin and it's hard to tell if other people are having issues without it!

uppercut-1.2.4-base.jar.zip

image

calvario-31 commented 2 days ago

thanks man just tested it and this issue is fixed with that version Believe this can be closed, however I some bugs introduced due the new format that you can see on the other ticket/issue