Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for withTestsFor (0.14 sec)

  1. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r76/TestLauncherTestSpecCrossVersionSpec.groovy

        def setup() {
            withFailingTest() // ensures that withTestsFor statements are not ignored
        }
    
        @TargetGradleVersion('>=3.0 <7.6')
        def "older Gradle versions ignore withTestsFor calls"() {
            when:
            launchTests { TestLauncher launcher ->
                launcher.withTestsFor { TestSpecs specs ->
                    specs.forTaskPath(':secondTest').includeClass('example.MyTest')
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 12.2K bytes
    - Viewed (0)
  2. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r82/TestLauncherTestSpecCrossVersionSpec.groovy

    import spock.lang.Issue
    
    @ToolingApiVersion('>=7.6')
    @TargetGradleVersion(">=8.2")
    class TestLauncherTestSpecCrossVersionSpec extends TestLauncherSpec {
    
        def setup() {
            withFailingTest() // ensures that withTestsFor statements are not ignored
        }
    
        @TargetGradleVersion(">=7.6 <8.2")
        @Issue("https://github.com/gradle/gradle/pull/25229")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 5.4K bytes
    - Viewed (0)
  3. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r83/TestLauncherCustomTestTaskCrossVersionTest.groovy

        @TargetGradleVersion(">=7.6 <8.3")
        def "Cannot run tests with custom task implementation in older Gradle versions"() {
            when:
            launchTests { TestLauncher launcher ->
                launcher.withTestsFor { TestSpecs specs ->
                    specs.forTaskPath(':myTestTask').includeClass('org.my.MyClass')
                }
            }
    
            then:
            Throwable exception = thrown(TestExecutionException)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 2.4K bytes
    - Viewed (0)
  4. platforms/ide/tooling-api/src/crossVersionTest/groovy/org/gradle/integtests/tooling/r76/TestLauncherTaskExecutionCrossVersionSpec.groovy

                TestLauncher testLauncher = connection.newTestLauncher()
                collectOutputs(testLauncher)
    
                testLauncher.forTasks("setupTest")
                            .withTestsFor(s -> s.forTaskPath(":test")
                            .includeMethod('MyTest', 'pass'))
                            .forTasks("cleanupTest")
                            .run()
            }
    
            then:
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  5. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/TestSpecs.java

     */
    
    package org.gradle.tooling;
    
    import org.gradle.api.Action;
    import org.gradle.api.Incubating;
    
    /**
     * Provides test selection from a specific test task.
     *
     * @see TestLauncher#withTestsFor(Action)
     * @since 7.6
     */
    @Incubating
    public interface TestSpecs {
    
        /**
         * Creates a new test selection for the target task.
         *
         * @param taskPath The target task.
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  6. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/TestLauncher.java

         * <pre>
         *     TestLauncher testLauncher = projectConnection.newTestLauncher();
         *     testLauncher.withTestsFor(spec -&gt; {
         *         spec.forTaskPath(":test")
         *             .includePackage("org.pkg")
         *             .includeClass("com.TestClass")
         *             .includeMethod("com.TestClass")
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 8.6K bytes
    - Viewed (0)
  7. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/TestSpec.java

     * <p>
     * A complex example:
     * <pre>
     * TestLauncher testLauncher = projectConnection.newTestLauncher();
     * testLauncher.withTestsFor(specs -&gt; {
     *     specs.forTaskPath(":test")                                    // configure the test selection on the ':test' task
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue Sep 26 14:49:20 UTC 2023
    - 4.5K bytes
    - Viewed (0)
  8. platforms/ide/tooling-api/src/main/java/org/gradle/tooling/internal/consumer/DefaultTestLauncher.java

                        return String.format("Could not execute tests using %s.", connection.getDisplayName());
                    }
                }));
            }
        }
    
        @Override
        public TestLauncher withTestsFor(Action<TestSpecs> testSpec) {
            DefaultTestSpecs testSpecs = new DefaultTestSpecs();
            testSpec.execute(testSpecs);
            taskSpecs.addAll(testSpecs.getTestSpecs());
            return this;
        }
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Tue May 28 12:11:05 UTC 2024
    - 9.1K bytes
    - Viewed (0)
Back to top