Clone Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Polish support for `@DisplayName` in tests

In particular, remove the need to pass a `hasDisplayNameAnnotation` flag

around, which is too specific for the test descriptors.

  1. … 14 more files in changeset.
If @DisplayName annotation is attached, output the annotation value to name attribute of testsuite and name attribute of testcase. If @DisplayName annotation is not attached, output the class FQN. In any case, output the class FQN to classname attribute of testcase.

Issue: #11445

Signed-off-by: Daiki Hirabayashi <hirabayashi@infoscience.co.jp>

  1. … 23 more files in changeset.
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. … 8 more files in changeset.
Include output of all failed suites in HTML report

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. … 8 more files in changeset.
Include output of all failed suites in HTML report

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. … 8 more files in changeset.
Include output of all failed suites in HTML report

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. … 8 more files in changeset.
Retain stacktrace when test method is inherited

By default Gradle is trying to find "test class name" in the stacktrace (which is smart!), however,

there are cases when test class name never appears in the stacktrace.

For instance, it might happen when test class uses inheritance.

The inheritance is typically used to test over different implementations.

The fix is to retain the stacktrace in case none of the lines match.

fixes #11220

Signed-off-by: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>

    • -0
    • +20
    ./FullExceptionFormatterTest.groovy
    • -11
    • +43
    ./ShortExceptionFormatterTest.groovy
  1. … 6 more files in changeset.
Fix failing test

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>

  1. … 5 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>

  1. … 6 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>

  1. … 5 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>

  1. … 5 more files in changeset.
Allow the services required by a given class to be queried prior to creating any instances of that class. Use this to allow `ArtifactTransformDependencies` to be injected into artifact transforms using any of the service injection patterns (that is, via a constructor or a getter).

    • -1
    • +1
    ./DefaultTestLoggingContainerTest.groovy
  1. … 127 more files in changeset.
Replace most direct usages of `DirectInstantiator` with indirect usages via `InstantiatorFactory` or test fixtures instead. This means more consistent behaviour in unit tests because the objects under test will behave more similarly to how they do at runtime. This also allows the decision of how the instantiation should behave to live in as few places as possible, so this can be more easily evolved and contextualized.

    • -2
    • +2
    ./DefaultTestLoggingContainerTest.groovy
  1. … 60 more files in changeset.
Move failure diagnostics to test report

  1. … 9 more files in changeset.
Make ClassMethodNameStackTraceSpec support anonymous class matching (#4797)

Make ClassMethodNameStackTraceSpec support anonymous class matching

This fixes https://github.com/gradle/gradle/issues/4681

Previously, when TestExceptionFormatter formats test stacktraces, it tries to

find the exactly matched class/method name as stacktrace truncation point.

However, some kotlin-based tests have only anonymous classes in their stacktraces,

which makes it impossible to find the exact truncation point. This PR treats

`SomeClass$1$1$1` and `SomeClass` equally when performing class name matching.

    • -9
    • +6
    ./ClassMethodNameStackTraceSpecTest.groovy
    • -0
    • +19
    ./FullExceptionFormatterTest.groovy
  1. … 1 more file in changeset.
Add displayName and classDisplayName to TestDescriptor (#4425)

Add displayName and classDisplayName to TestDescriptor

This fixes https://github.com/gradle/gradle/issues/4424 and https://github.com/gradle/gradle/issues/4423

JUnit 5 introduces @DisplayName and dynamic tests, which allows users to

customize test case and test class' name. This should be taken into

account. This PR introduces `displayName` and `classDisplayName` which are

used for display. When rendering HTML reports, these two fields will be used.

  1. … 33 more files in changeset.
Fix test

    • -4
    • +4
    ./TestWorkerProgressListenerTest.groovy
Fix parallel test execution rendering with TestNG in console (#2787)

    • -4
    • +4
    ./TestWorkerProgressListenerTest.groovy
  1. … 5 more files in changeset.
Abbreviate long qualified test classes when displaying in console

Omit the middle packages of a long test class name. For example:

org.gradle.api.internal.tasks.testing.logging.TestWorkerProgressListenerTest

becomes

org.gradle...testing.logging.TestWorkerProgressListenerTest

Issue: #2547

    • -0
    • +29
    ./JavaClassNameFormatterTest.groovy
  1. … 4 more files in changeset.
Don't render test worker info in console

    • -1
    • +1
    ./TestWorkerProgressListenerTest.groovy
  1. … 3 more files in changeset.
Display parallel test execution through console (#2335)

    • -0
    • +212
    ./TestWorkerProgressListenerTest.groovy
  1. … 4 more files in changeset.
Fix test to pass under JDK 9

Signed-off-by: Cedric Champeau <cedric@gradle.com>

Set default log level back to LIFECYCLE (#2015)

    • -3
    • +3
    ./DefaultTestLoggingContainerTest.groovy
  1. … 41 more files in changeset.
Change default log level to WARN (#1952)

    • -14
    • +17
    ./DefaultTestLoggingContainerTest.groovy
  1. … 44 more files in changeset.
Moved more classes to live with the logging text output classes.

  1. … 60 more files in changeset.
Moved progress logging and styled text logging interfaces to live in their own packages.

  1. … 154 more files in changeset.
Moved logging test fixtures from 'core' to 'logging' project.

  1. … 48 more files in changeset.
Moved internal logging classes from 'core' to 'logging' project.

  1. … 417 more files in changeset.
Busted up some package cycles and switched on classcycle checks for 'messaging' project.

  1. … 31 more files in changeset.