Advertisement
nsaunders

Untitled

Aug 2nd, 2021
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.99 KB | None | 0 0
  1. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
  2. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ gradle clean test
  3. > Task :app:test FAILED
  4.  
  5. FAILURE: Build failed with an exception.
  6.  
  7. * What went wrong:
  8. Execution failed for task ':app:test'.
  9. > There were failing tests. See the report at: file:///home/nicholas/NetBeansProjects/testng_gradle/app/build/reports/tests/test/index.html
  10.  
  11. * Try:
  12. 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.
  13.  
  14. * Get more help at https://help.gradle.org
  15.  
  16. Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
  17. Use '--warning-mode all' to show the individual deprecation warnings.
  18. See https://docs.gradle.org/7.0.2/userguide/command_line_interface.html#sec:command_line_warnings
  19.  
  20. BUILD FAILED in 1s
  21. 4 actionable tasks: 4 executed
  22. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
  23. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat build/reports/tests/test/index.html
  24. <!DOCTYPE html>
  25. <html>
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  28. <meta http-equiv="x-ua-compatible" content="IE=edge"/>
  29. <title>Test results - Test Summary</title>
  30. <link href="css/base-style.css" rel="stylesheet" type="text/css"/>
  31. <link href="css/style.css" rel="stylesheet" type="text/css"/>
  32. <script src="js/report.js" type="text/javascript"></script>
  33. </head>
  34. <body>
  35. <div id="content">
  36. <h1>Test Summary</h1>
  37. <div id="summary">
  38. <table>
  39. <tr>
  40. <td>
  41. <div class="summaryGroup">
  42. <table>
  43. <tr>
  44. <td>
  45. <div class="infoBox" id="tests">
  46. <div class="counter">1</div>
  47. <p>tests</p>
  48. </div>
  49. </td>
  50. <td>
  51. <div class="infoBox" id="failures">
  52. <div class="counter">1</div>
  53. <p>failures</p>
  54. </div>
  55. </td>
  56. <td>
  57. <div class="infoBox" id="ignored">
  58. <div class="counter">0</div>
  59. <p>ignored</p>
  60. </div>
  61. </td>
  62. <td>
  63. <div class="infoBox" id="duration">
  64. <div class="counter">0.114s</div>
  65. <p>duration</p>
  66. </div>
  67. </td>
  68. </tr>
  69. </table>
  70. </div>
  71. </td>
  72. <td>
  73. <div class="infoBox failures" id="successRate">
  74. <div class="percent">0%</div>
  75. <p>successful</p>
  76. </div>
  77. </td>
  78. </tr>
  79. </table>
  80. </div>
  81. <div id="tabs">
  82. <ul class="tabLinks">
  83. <li>
  84. <a href="#tab0">Failed tests</a>
  85. </li>
  86. <li>
  87. <a href="#tab1">Packages</a>
  88. </li>
  89. <li>
  90. <a href="#tab2">Classes</a>
  91. </li>
  92. </ul>
  93. <div id="tab0" class="tab">
  94. <h2>Failed tests</h2>
  95. <ul class="linkList">
  96. <li>
  97. <a href="classes/Gradle%2320Test%2320Executor%23206.html">Gradle Test Executor 6</a>.
  98. <a href="classes/Gradle%2320Test%2320Executor%23206.html#failed to execute tests">failed to execute tests</a>
  99. </li>
  100. </ul>
  101. </div>
  102. <div id="tab1" class="tab">
  103. <h2>Packages</h2>
  104. <table>
  105. <thead>
  106. <tr>
  107. <th>Package</th>
  108. <th>Tests</th>
  109. <th>Failures</th>
  110. <th>Ignored</th>
  111. <th>Duration</th>
  112. <th>Success rate</th>
  113. </tr>
  114. </thead>
  115. <tbody>
  116. <tr>
  117. <td class="failures">
  118. <a href="packages/default-package.html">default-package</a>
  119. </td>
  120. <td>1</td>
  121. <td>1</td>
  122. <td>0</td>
  123. <td>0.114s</td>
  124. <td class="failures">0%</td>
  125. </tr>
  126. </tbody>
  127. </table>
  128. </div>
  129. <div id="tab2" class="tab">
  130. <h2>Classes</h2>
  131. <table>
  132. <thead>
  133. <tr>
  134. <th>Class</th>
  135. <th>Tests</th>
  136. <th>Failures</th>
  137. <th>Ignored</th>
  138. <th>Duration</th>
  139. <th>Success rate</th>
  140. </tr>
  141. </thead>
  142. <tbody>
  143. <tr>
  144. <td class="failures">
  145. <a href="classes/Gradle%2320Test%2320Executor%23206.html">Gradle Test Executor 6</a>
  146. </td>
  147. <td>1</td>
  148. <td>1</td>
  149. <td>0</td>
  150. <td>0.114s</td>
  151. <td class="failures">0%</td>
  152. </tr>
  153. </tbody>
  154. </table>
  155. </div>
  156. </div>
  157. <div id="footer">
  158. <p>
  159. <div>
  160. <label class="hidden" id="label-for-line-wrapping-toggle" for="line-wrapping-toggle">Wrap lines
  161. <input id="line-wrapping-toggle" type="checkbox" autocomplete="off"/>
  162. </label>
  163. </div>Generated by
  164. <a href="http://www.gradle.org">Gradle 7.0.2</a> at Aug 2, 2021, 3:26:58 AM</p>
  165. </div>
  166. </div>
  167. </body>
  168. </html>
  169. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
  170. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat build.gradle
  171. /*
  172. * This file was generated by the Gradle 'init' task.
  173. *
  174. * This generated file contains a sample Java application project to get you started.
  175. * For more details take a look at the 'Building Java & JVM projects' chapter in the Gradle
  176. * User Manual available at https://docs.gradle.org/7.0.2/userguide/building_java_projects.html
  177. */
  178.  
  179. plugins {
  180. // Apply the application plugin to add support for building a CLI application in Java.
  181. id 'application'
  182. }
  183.  
  184. repositories {
  185. // Use Maven Central for resolving dependencies.
  186. mavenCentral()
  187. mavenLocal()
  188. jcenter()
  189. }
  190.  
  191. dependencies {
  192. // Use TestNG framework, also requires calling test.useTestNG() below
  193. //compile 'org.testng:testng:7.3.0'
  194. testImplementation 'org.testng:testng:7.3.0'
  195.  
  196. // This dependency is used by the application.
  197. implementation 'com.google.guava:guava:30.0-jre'
  198. }
  199.  
  200. application {
  201. // Define the main class for the application.
  202. mainClass = 'testng_gradle.App'
  203. }
  204.  
  205.  
  206.  
  207.  
  208. tasks.named('test') {
  209. useTestNG() {
  210. includeGroups 'smoke', 'sanity'
  211. excludeGroups 'regression'
  212. testLogging.showStandardStreams = true
  213. suiteXmlBuilder().suite(name: 'Sample Suite') {
  214. test(name : 'Sample Test') {
  215. classes('') {
  216. 'class'(name: 'testing_gradle.AppTest')
  217. }
  218. }
  219. }
  220.  
  221. }
  222. }
  223.  
  224.  
  225.  
  226.  
  227. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
  228. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat src/test/
  229. java/ resources/
  230. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$ cat src/test/java/testng_gradle/AppTest.java
  231. /*
  232. * This Java source file was generated by the Gradle 'init' task.
  233. */
  234. package testng_gradle;
  235.  
  236. import org.testng.annotations.*;
  237. import static org.testng.Assert.*;
  238.  
  239. public class AppTest {
  240. @Test public void appHasAGreeting() {
  241. App classUnderTest = new App();
  242. assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
  243. }
  244. }
  245. nicholas@mordor:~/NetBeansProjects/testng_gradle/app$
  246.  
  247.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement