softwareCobbler / luceedebug

line debugger for lucee
GNU Lesser General Public License v2.1
44 stars 15 forks source link

How to Run Tests? #46

Open jamiejackson opened 1 year ago

jamiejackson commented 1 year ago

I mentioned this in #45 but wanted to create a separate ticket for it.

How does one set up and run tests?

Here's what happens when I try. (Note that docker is running.)

luceedebug % docker ps       
CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES

luceedebug % docker --version
Docker version 20.10.17, build 100c701

luceedebug % ./gradlew test                  
Setting maxParallelForks to 12

> Task :luceedebug:test

EvaluatesAnExpression > a() STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

StepsToFinallyAndThenCatchSkippingPastUnwoundLines > a() STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

SteppingWorksAsExpectedOnSinglelineStatementWithManySubexpressions > a() STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

HitsABreakpointAndRetrievesVariableInfo > a() STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

SteppingThroughDefaultArgs > a() STANDARD_ERROR
    SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
    SLF4J: Defaulting to no-operation (NOP) logger implementation
    SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

HitsABreakpointAndRetrievesVariableInfo > a() FAILED
    org.opentest4j.AssertionFailedError at HitsABreakpointAndRetrievesVariableInfo.java:59

SteppingThroughDefaultArgs > a() FAILED
    org.opentest4j.AssertionFailedError at SteppingThroughDefaultArgs.java:58

EvaluatesAnExpression > a() FAILED
    org.opentest4j.AssertionFailedError at EvaluatesAnExpression.java:57

SteppingWorksAsExpectedOnSinglelineStatementWithManySubexpressions > a() FAILED
    org.opentest4j.AssertionFailedError at SteppingWorksAsExpectedOnSinglelineStatementWithManySubexpressions.java:57

StepsToFinallyAndThenCatchSkippingPastUnwoundLines > a() FAILED
    org.opentest4j.AssertionFailedError at StepsToFinallyAndThenCatchSkippingPastUnwoundLines.java:57

5 tests completed, 5 failed

> Task :luceedebug:test FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':luceedebug:test'.
> There were failing tests. See the report at: file:///Users/jjackson/projects/luceedebug/luceedebug/build/reports/tests/test/index.html

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 22s
6 actionable tasks: 4 executed, 2 up-to-date

The report shows this as the root cause: org.opentest4j.AssertionFailedError: server is up ==> expected: <true> but was: <false>

softwareCobbler commented 1 year ago

Yeah, gradlew test ought to do it.

I haven't been able to reproduce these failures, so you might to have pick a single test and try to decipher why a particular assertion is failing.

A broad overview of the tests is: