Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Include output of all failed suites in HTML report (#11262)

Prior to this commit, only the output of the root `TestDescriptor` was

included in the HTML report even though all failed suites were included

with their exceptions.

    • -1
    • +39
    ./gradle/testing/TestReportIntegrationTest.groovy
  1. … 8 more files in changeset.
Use display name in test logging

Test logging now logs the display name if it is available.

Fixes: #10983

Co-authored-by: Mark Nordhoff <mark.nordhoff@freenet.de>

    • -0
    • +101
    ./gradle/testing/junitplatform/JUnitPlatformLoggingIntegrationTest.groovy
  1. … 3 more files in changeset.
Fix executing Specs tests via JUnit Platform and Vintage engine

Prior to this commit, the JUnitPlatformTestExecutionListener parsed the

unique ID to determine the class and method name for TestIdentifiers

without children but with a ClassSource. This occurs when a Spock test

class uses `@Unroll` on all its test methods. However, other testing

frameworks such as Specs2 don't provide a unique ID that is parseable

which lead to the methodName being null which cause a failure during

serialization. The effect was that tests hung because the build VM

was waiting for the worker to finish the tests it started.

The Spock-specific workaround in our listener is now replaced with a

more robust one that always uses the methodName provided by the JUnit

Platform instead of parsing it.

  1. … 1 more file in changeset.
Remove an unnecessary `@IgnoreIf` from a bunch of tests.

  1. … 16 more files in changeset.
Removed `ExecutionResult.executedTasks` and `skippedTasks` properties. Tests should use the assertion methods instead.

  1. … 5 more files in changeset.
Changed a bunch of integration tests to use the various task assertion methods instead of directly querying the `executedTasks` and `skippedTasks` collections. These methods can give better diagnostics when the assertion fails, and can perform additional checks.

    • -12
    • +12
    ./gradle/testing/TestReportIntegrationTest.groovy
  1. … 95 more files in changeset.
Let testing-jvm tests not use deprecated configurations

    • -1
    • +1
    ./gradle/testing/IncrementalTestIntegrationTest.groovy
    • -4
    • +4
    ./gradle/testing/ParallelTestExecutionIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/SuiteTimestampIntegrationTest.groovy
    • -4
    • +4
    ./gradle/testing/TestOutputListenerIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/TestProgressLoggingIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/TestTaskJdkRelocationIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/TestTaskJvmArgsProviderIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/TestTaskRelocationIntegrationTest.groovy
    • -13
    • +13
    ./gradle/testing/TestingIntegrationTest.groovy
  1. … 62 more files in changeset.
Replace 'Matchers' with 'CoreMatchers'

So we do not require 'org.hamcrest:hamcrest-library' as additional

dependency anymore. Which was only available for most of the tests

because it leaked onto the test compile classpath.

    • -2
    • +2
    ./gradle/jvm/test/JUnitStandaloneTestExecutionIntegrationTest.groovy
    • -2
    • +2
    ./gradle/testing/junit/JUnitLoggingOutputCaptureIntegrationTest.groovy
    • -2
    • +2
    ./gradle/testing/junit/RerunPreviousFailedTestIntegrationTest.groovy
    • -1
    • +1
    ./gradle/testing/testng/TestNGLoggingOutputCaptureIntegrationTest.groovy
  1. … 148 more files in changeset.
Revert "Run tests against JUnit 4.13-beta-2"

This reverts commit 05d0a7b3b44f29d01fac4a160e23999858c04851.

Fix filtering parameterized tests by category

Prior to this commit methods in parameterized test classes were not

checked for `@Category` annotations.

Resolves #8424.

    • -9
    • +16
    ./gradle/testing/junit/JUnitCategoriesCoverageIntegrationSpec.groovy
  1. … 4 more files in changeset.
Run tests against JUnit 4.13-beta-2

Fix handling of aborted containers with completed children

When a container `TestIdentifier` was reported as finished, we reported

all of its children as skipped, regardless whether they already had been

completed previously. Now, we only report unstarted children as skipped.

Resolves #8685.

    • -0
    • +53
    ./gradle/testing/junit/JUnitAbortedTestClassIntegrationTest.groovy
  1. … 3 more files in changeset.
Simplify tests that look for rich content in the console output.

  1. … 16 more files in changeset.
Update references to 1.6 compatibility to 1.7

    • -7
    • +7
    ./gradle/jvm/test/JUnitComponentUnderTestIntegrationTest.groovy
  1. … 20 more files in changeset.
Add test output only once to cache artifact

Both reports have been added to the cached artifact by accident, since

the reports are declared as nested parameters via `enabledReports` on

the `ReportContainer` and the getters on `TestTaskReports`.

The annotated getters on `TestTaskReports` also prevented the test task

to be up-to-date when only the configuration for disabled reports

changed.

    • -0
    • +24
    ./gradle/testing/IncrementalTestIntegrationTest.groovy
  1. … 1 more file in changeset.
spelling: uninstantiable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

spelling: parentheses

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

    • -1
    • +1
    ./gradle/testing/junit/JUnitLoggingOutputCaptureIntegrationTest.groovy
  1. … 1 more file in changeset.
Support multiple concurrent executions of same TestNG class

When the same test class is executed concurrently, we now only report

the first start and the last completion of the test class. Previously,

the test class was reported as started multiple times but only reported

as completed once.

Fixes #7878.

  1. … 1 more file in changeset.
Increase number of test classes executing in parallel

Improve readability of test

    • -36
    • +42
    ./gradle/testing/TestListenerBuildOperationAdapterIntegrationTest.groovy
Polishing

  1. … 7 more files in changeset.
Add support for executing test classes in parallel via JUnit Platform

Fixes #6453.

    • -12
    • +28
    ./gradle/testing/TestListenerBuildOperationAdapterIntegrationTest.groovy
    • -5
    • +12
    ./gradle/testing/junit/JUnitSmokeMultiVersionIntegrationSpec.groovy
  1. … 7 more files in changeset.
Finalize the value of any task `@Input` property whose getter returns a property instance, at the start of execution of the task.

This means that the property value will not change once the task has started execution, so that the same value is always used during fingerprinting, cache key calculation, validation, when queried by a task action, and so on.

This behaviour only applies to `@Input` properties in this commit. This was just a place to start. Other properties will be added in later commits.

Changes to the property are ignored once the value is finalized implicitly in this way and generate a deprecation warning instead of failing, as would happen after `finalizeValue()` is called. This allows a migration path for task types that can add a new property to represent some input and keep their existing lenient (but now deprecated) behaviour for an existing property backed by the new property. It might prove better to flip this around, let's see.

    • -1
    • +1
    ./gradle/jvm/test/JUnitStandaloneTestExecutionIntegrationTest.groovy
  1. … 61 more files in changeset.
Try to execute unparseable test class files

Instead of failing the build when a test class file cannot be parsed,

e.g. if it's compiled for a JVM that is not yet supported by the

version of ASM that we use, we now assume it's a test class and pass

it to the testing framework which usually ignores classes that are not

tests.

Related issue: #7059

  1. … 4 more files in changeset.
Remove log message that cannot be actioned by user

    • -2
    • +0
    ./gradle/testing/TestEnvironmentIntegrationTest.groovy
  1. … 1 more file in changeset.
Verify tests running in modular Java can access SLF4j

    • -1
    • +18
    ./gradle/testing/TestEnvironmentIntegrationTest.groovy
  1. … 7 more files in changeset.
Allow testing with `java.system.class.path` and SLF4j

The core `Slf4jLoggingConfigurer` assumes that the Gradle implementation

of `org.slf4j.ILoggerFactory` is being used. This is not the case when

tests are run using a custom system classloader (by setting the

`java.system.class.loader` system property).

Previously, this would result in a `ClassCastException` when attempting

to configure the logger. This change makes `Slf4jLoggingConfigurer` lenient

in this case, opting not to configure the underlying logger rather than

fail.

Fixes #2657

    • -0
    • +17
    ./gradle/testing/TestEnvironmentIntegrationTest.groovy
  1. … 4 more files in changeset.
Merge pull request #6395 from gradle/wolfs/deprecations/classesDir

Another try at removing the classes dir.

This reverts commit 76e359df

    • -26
    • +1
    ./gradle/testing/TestTaskIntegrationTest.groovy
  1. … 25 more files in changeset.
Revert "Merge pull request #6395 from gradle/wolfs/deprecations/classesDir"

Reverting since it breaks some cross version checks.

This reverts commit adaf86371e3d58d929030184bfc1c11b60ade1bf, reversing

changes made to 37df84902151344db627d6ea7c67461413ad55c9.

    • -1
    • +26
    ./gradle/testing/TestTaskIntegrationTest.groovy
  1. … 25 more files in changeset.
Report TestNG test methods below test classes

Prior to this commit, test methods were reported as siblings of their

test classes for recent versions of TestNG:

gradle test executor test descriptor

└── test Ng suite test descriptor

├── class level suite test descriptor

└── test method test descriptor

Now, test methods are reported as children of their test classes:

gradle test executor test descriptor

└── test Ng suite test descriptor

└── class level suite test descriptor

└── test method test descriptor

Resolves #6679.

  1. … 4 more files in changeset.