Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ gradle clean test
- > Task :app:test FAILED
- FAILURE: Build failed with an exception.
- * What went wrong:
- Execution failed for task ':app:test'.
- > There were failing tests. See the report at: file:///home/nicholas/NetBeansProjects/testng_gradle/app/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
- Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
- Use '--warning-mode all' to show the individual deprecation warnings.
- See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
- BUILD FAILED in 1s
- 4 actionable tasks: 4 executed
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat build/reports/tests/test/index.html
- <!DOCTYPE html>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
- <meta http-equiv="x-ua-compatible" content="IE=edge"/>
- <title>Test results - Test Summary</title>
- <link href="css/base-style.css" rel="stylesheet" type="text/css"/>
- <link href="css/style.css" rel="stylesheet" type="text/css"/>
- <script src="js/report.js" type="text/javascript"></script>
- </head>
- <body>
- <div id="content">
- <h1>Test Summary</h1>
- <div id="summary">
- <table>
- <tr>
- <td>
- <div class="summaryGroup">
- <table>
- <tr>
- <td>
- <div class="infoBox" id="tests">
- <div class="counter">1</div>
- <p>tests</p>
- </div>
- </td>
- <td>
- <div class="infoBox" id="failures">
- <div class="counter">1</div>
- <p>failures</p>
- </div>
- </td>
- <td>
- <div class="infoBox" id="ignored">
- <div class="counter">0</div>
- <p>ignored</p>
- </div>
- </td>
- <td>
- <div class="infoBox" id="duration">
- <div class="counter">0.114s</div>
- <p>duration</p>
- </div>
- </td>
- </tr>
- </table>
- </div>
- </td>
- <td>
- <div class="infoBox failures" id="successRate">
- <div class="percent">0%</div>
- <p>successful</p>
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div id="tabs">
- <ul class="tabLinks">
- <li>
- <a href="#tab0">Failed tests</a>
- </li>
- <li>
- <a href="#tab1">Packages</a>
- </li>
- <li>
- <a href="#tab2">Classes</a>
- </li>
- </ul>
- <div id="tab0" class="tab">
- <h2>Failed tests</h2>
- <ul class="linkList">
- <li>
- <a href="classes/Gradle%2320Test%2320Executor%23206.html">Gradle Test Executor 6</a>.
- <a href="classes/Gradle%2320Test%2320Executor%23206.html#failed to execute tests">failed to execute tests</a>
- </li>
- </ul>
- </div>
- <div id="tab1" class="tab">
- <h2>Packages</h2>
- <table>
- <thead>
- <tr>
- <th>Package</th>
- <th>Tests</th>
- <th>Failures</th>
- <th>Ignored</th>
- <th>Duration</th>
- <th>Success rate</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="failures">
- <a href="packages/default-package.html">default-package</a>
- </td>
- <td>1</td>
- <td>1</td>
- <td>0</td>
- <td>0.114s</td>
- <td class="failures">0%</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div id="tab2" class="tab">
- <h2>Classes</h2>
- <table>
- <thead>
- <tr>
- <th>Class</th>
- <th>Tests</th>
- <th>Failures</th>
- <th>Ignored</th>
- <th>Duration</th>
- <th>Success rate</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td class="failures">
- <a href="classes/Gradle%2320Test%2320Executor%23206.html">Gradle Test Executor 6</a>
- </td>
- <td>1</td>
- <td>1</td>
- <td>0</td>
- <td>0.114s</td>
- <td class="failures">0%</td>
- </tr>
- </tbody>
- </table>
- </div>
- </div>
- <div id="footer">
- <p>
- <div>
- <label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
- <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
- </label>
- </div>Generated by
- <a href="http://www.gradle.org">Gradle 7.0.2</a> at Aug 2, 2021, 3:26:58 AM</p>
- </div>
- </div>
- </body>
- </html>
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat build.gradle
- /*
- * This file was generated by the Gradle 'init' task.
- *
- * This generated file contains a sample Java application project to get you started.
- * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
- * User Manual available at https://docs.gradle.org/7.0.2/userguide/building_java_projects.html
- */
- plugins {
- // Apply the application plugin to add support for building a CLI application in Java.
- id 'application'
- }
- repositories {
- // Use Maven Central for resolving dependencies.
- mavenCentral()
- mavenLocal()
- jcenter()
- }
- dependencies {
- // Use TestNG framework, also requires calling test.useTestNG() below
- //compile 'org.testng:testng:7.3.0'
- testImplementation 'org.testng:testng:7.3.0'
- // This dependency is used by the application.
- implementation 'com.google.guava:guava:30.0-jre'
- }
- application {
- // Define the main class for the application.
- mainClass = 'testng_gradle.App'
- }
- tasks.named('test') {
- useTestNG() {
- includeGroups 'smoke', 'sanity'
- excludeGroups 'regression'
- testLogging.showStandardStreams = true
- suiteXmlBuilder().suite(name: 'Sample Suite') {
- test(name : 'Sample Test') {
- classes('') {
- 'class'(name: 'testing_gradle.AppTest')
- }
- }
- }
- }
- }
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat src/test/
- java/ resources/
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat src/test/java/testng_gradle/AppTest.java
- /*
- * This Java source file was generated by the Gradle 'init' task.
- */
- package testng_gradle;
- import org.testng.annotations.*;
- import static org.testng.Assert.*;
- public class AppTest {
- @Test public void appHasAGreeting() {
- App classUnderTest = new App();
- assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
- }
- }
- nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement