Lines Matching +full:plugin +full:- +full:syntax +full:- +full:import +full:- +full:meta
24 /* Set the command-line table option column width. */
25 #command-line colgroup.option {
33 displayMenu("documentation-main.html")
38 <!-- --------------------------
40 <table class="float-right">
43 <script type="text/javascript"><!--
44 google_ad_client = "pub-1467757024002850";
49 //-->
50 <!--
61 ------------------------------- -->
63 <!-------------------------------------
65 ------------------------------------>
69 <div id="table-of-contents">
73 <!-------------------------------------
75 ------------------------------------>
82 Writing a test is typically a three-step process:
87 …he class name, the groups you wish to run, etc...) in a <tt><a href="#testng-xml">testng.xml</a></…
114 <li>A description of the testng.xml file, its syntax and what you can specify in it.
121 <!-------------------------------------
123 ------------------------------------>
494 <!-------------------------------------
496 ------------------------------------>
497 <h3><a class="section" name="testng-xml">testng.xml</a></h3>
502 <a href="http://testng.org/testng-1.0.dtd">http://testng.org/testng-1.0.dtd</a>
511 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
533 <!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
575 run in an unpredictible order, set the <tt>preserve-order</tt>
580 <test name="Regression1" preserve-order="false">
600 <!-------------------------------------
602 ------------------------------------>
604 <h3><a class="section" name="running-testng">Running TestNG</a></h3>
627 …the TestNG suite you are trying to run. Additionally, the following command-line switches are ava…
631 <table id="command-line">
646 <td>-configfailurepolicy</td>
653 <td>-d</td>
655 <td>The directory where the reports will be generated (defaults to <tt>test-output</tt>).</td>
659 <td>-dataproviderthreadcount</td>
663 …y take effect if the parallel mode has been selected (for example, with the -parallel option). Thi…
667 <td>-excludegroups</td>
668 …<td>A comma-separated list of groups.</td><td>The list of groups you want to be excluded from this…
672 <td>-groups</td>
673 <td>A comma-separated list of groups.</td>
678 <td>-listener</td>
679 <td>A comma-separated list of Java classes that can be found on your classpath.</td>
684 <td>-methods</td>
690 <td>-methodselectors</td>
691 <td>A comma-separated list of Java classes and method
698 <td>-parallel</td>
704 <td>-reporter</td>
706 …<td>Similar to the <tt>-listener</tt> option, except that it allows the configuration of JavaBeans…
708 … Example: <tt>-reporter com.test.MyReporter:methodFilter=*insert*,enableFiltering=true</tt>
714 <td>-sourcedir</td>
715 <td>A semi-colon separated list of directories.</td>
716 …nnotations. (e.g. <tt>"src/test"</tt> or <tt>"src/test/org/testng/eclipse-plugin;src/test/org/test…
720 <td>-suitename</td>
722 …ible to create a suite name with spaces in it if you surround it with double-quotes "like this".</…
726 <td>-testclass</td>
727 …<td>A comma-separated list of classes that can be found in your classpath.</td><td>A list of class…
731 <td>-testjar</td>
737 <td>-testname</td>
739 …sible to create a test name with spaces in it if you surround it with double-quotes "like this".</…
743 <td>-testnames</td>
749 <td>-testrunfactory</td>
755 <td>-threadcount</td>
757 …y take effect if the parallel mode has been selected (for example, with the -parallel option). Thi…
761 <td>-xmlpathinjar</td>
763 …l</tt>" at the root of the jar file. This option will be ignored unless <tt>-testjar</tt> is speci…
779 -d test-output testng.xml
788 java -Dtestng.test.classpath="c:/build;c:/java/classes;" org.testng.TestNG testng.xml
806 <td>A semi-colon separated series of directories that contain your test classes.</td>
816 java org.testng.TestNG -groups windows,linux -testclass org.test.MyTest
819 The <a href="ant.html">ant task</a> and <a href="#testng-xml">testng.xml</a> allow you to launch Te…
823 …pecify a <tt>testng.xml</tt> file, with the exception of <tt>-includedgroups</tt> and <tt>-exclude…
825 <!-------------------------------------
827 ------------------------------------>
831 <h4><a class="section" indent=".." name="test-methods">Test methods</a></h4>
833 … that happen to return a value will be ignored, unless you set <tt>allow-return-values</tt> to <tt…
836 <suite allow-return-values="true">
840 <test allow-return-values="true">
844 <h4><a class="section" indent=".." name="test-groups">Test groups</a></h4>
862 <li>Check-in tests. These tests should be run before you submit new
871 Typically, check-in tests are a subset of functional tests. TestNG
956 … aware of the difference (for example, "anything" is matched by ".*" -- dot star -- and not "*").<…
959 <h4><a name="method-groups">Method groups</a></h4>
984 <h4><a class="section" indent=".." name="groups-of-groups">Groups of groups</a></h4>
1018 </p><!-------------------------------------
1020 ------------------------------------>
1070 <!-------------------------------------
1072 ------------------------------------>
1074 <h4><a class="section" indent=".." name="partial-groups">Partial groups</a></h4>
1080 @Test(groups = { "checkin-test" })
1083 @Test(groups = { "func-test" )
1090 In this class, method2() is part of the group "checkin-test", which is defined
1091 at the class level, while method1() belongs to both "checkin-test" and
1092 "func-test".
1094 <!-------------------------------------
1096 ------------------------------------>
1112 <h5><a class="section" indent="..." name="parameters-testng-xml">Parameters from <tt>testng.xml</tt…
1121 @Parameters({ "first-name" })
1130 should receive the value of the XML parameter called <tt>first-name</tt><i>.</i>
1136 <parameter name="first-name" value="Cedric"/>
1138 <-- ... -->
1141 <h4><span style="font-weight: 400">The same technique can be used for <tt>@Before/After </tt>and <t…
1154 and <tt>jdbc-driver </tt>respectively.
1194 <h5><a class="section" indent="..." name="parameters-dataproviders">Parameters with DataProviders</…
1230 …r in a different class, it needs to be a static method or a class with a non-arg constructor, and …
1309 <suite name="Suite1" data-provider-thread-count="20" >
1317 <h5><a class="section" indent="..." name="parameters-reports">Parameters in reports</a></h5>
1331 <!-------------------------------------
1333 ------------------------------------>
1336 <h4><a class="section" indent=".." name="dependent-methods">Dependencies</a></h4>
1353 <h5><a class="section" indent="..." name="dependencies-with-annotations">Dependencies with annotati…
1427 For this ordering, you can use the XML attribute <tt>group-by-instances</tt>. This attribute is val…
1430 <suite name="Factory" group-by-instances="true">
1432 <test name="Factory" group-by-instances="true">
1436 <h5><a class="section" indent="..." name="dependencies-in-xml">Dependencies in XML</a></h5>
1444 <group name="c" depends-on="a b" />
1445 <group name="z" depends-on="c" />
1451 The <tt><depends-on></tt> attribute contains a space-separated list of groups.
1454 <!-------------------------------------
1456 ------------------------------------>
1467 @Test(parameters = { "number-of-times" })
1469 while (numberOfTimes-- > 0) {
1479 <parameter name="number-of-times" value="10"/>
1484 <parameter name="number-of-times" value="20"/>
1489 <parameter name="number-of-times" value="30"/>
1565 <!-------------------------------------
1567 ------------------------------------>
1569 <h4><a class="section" indent=".." name="class-level">Class level annotations</a></h4>
1606 <!-------------------------------------
1608 ------------------------------------>
1610 <h4><a class="section" indent=".." name="parallel-running">Parallelism and time-outs</a></h4>
1614 <h5><a class="section" indent="..." name="parallel-suites">Parallel suites</a></h5>
1619 java org.testng.TestNG -suitethreadpoolsize 3 testng1.xml testng2.xml testng3.xml
1624 <h5><a class="section" indent="..." name="parallel-tests">Parallel tests, classes and methods</a></…
1628 <suite name="My suite" parallel="methods" thread-count="5">
1632 <suite name="My suite" parallel="tests" thread-count="5">
1636 <suite name="My suite" parallel="classes" thread-count="5">
1640 <suite name="My suite" parallel="instances" thread-count="5">
1672 thread-count</i> allows you to specify how many threads should be allocated for
1675 …parallel and non-parallel mode.</i></p></blockquote>You can also specify that a <tt>@Test</tt> met…
1681 …ill be invoked ten times from three different threads. Additionally, a time-out of ten seconds gu…
1683 <!-------------------------------------
1685 ------------------------------------>
1690 Every time tests fail in a suite, TestNG creates a file called <tt>testng-failed.xml</tt> in the ou…
1697 java -classpath testng.jar;%CLASSPATH% org.testng.TestNG -d test-outputs testng.xml
1698 java -classpath testng.jar;%CLASSPATH% org.testng.TestNG -d test-outputs test-outputs\testng-failed…
1701 <p>Note that <tt>testng-failed.xml</tt> will contain all the necessary dependent
1716 <!-- ... -->
1736 <!-------------------------------------
1738 --------------------------------------->
1741 <!-------------------------------------
1743 ------------------------------------>
1744 <h4><a class="section" indent=".." name="running-testng-programmatically">Running TestNG programmat…
1759 …d the package <tt><a href="http://testng.org/javadocs/org/testng/xml/package-frame.html">org.testn…
1795 <p>Please see the <a href="../doc/javadocs/org/testng/package-summary.html" target="mainFrame">Java…
1798 <!-------------------------------------
1800 ------------------------------------>
1810 <method-selectors>
1811 <method-selector>
1815 </method-selector>
1816 </method-selectors>
1817 <!-- ... -->
1832 <!-------------------------------------
1834 ------------------------------------>
1857 * testConstructor and testMethod will be non-null.
1878 java org.testng.TestNG -listener MyTransformer testng.xml
1909 <!-------------------------------------
1911 ------------------------------------>
1947 java -classpath "testng-jdk15.jar:test/build" org.testng.TestNG -listener test.methodinterceptors.N…
1948 -testclass test.methodinterceptors.FooTest
1951 For the equivalent <tt>ant</tt> syntax, see the <tt>listeners</tt> attribute in the <a href="ant.ht…
1976 <!-------------------------------------
1978 ------------------------------------>
1980 <h4><a class="section" indent=".." name="testng-listeners">TestNG Listeners</a></h4>
1990 …<li><tt>IReporter</tt> (<a href="#logging-reporters">doc</a>, <a href="../javadocs/org/testng/IRep…
1992 …<li><tt>ITestListener</tt> (<a href="#logging-listeners">doc</a>, <a href="../javadocs/org/testng/…
1998 <li><a href="#running-testng">Using -listener on the command line.</a>
2005 <h5><a class="section" indent="..." name="listeners-testng-xml">Specifying listeners with <tt>testn…
2013 <listener class-name="com.example.MyListener" />
2014 <listener class-name="com.example.MyMethodInterceptor" />
2036 <h5><a class="section" indent="..." name="listeners-service-loader">Specifying listeners with <tt>S…
2066 Compile this file, then create a file at the location <tt>META-INF/services/org.testng.ITestNGListe…
2074 |____META-INF
2081 $ cat META-INF/services/org.testng.ITestNGListener
2090 ignoring entry META-INF/
2091 adding: META-INF/services/(in = 0) (out= 0)(stored 0%)
2092 adding: META-INF/services/org.testng.ITestNGListener(in = 26) (out= 28)(deflated -7%)
2101 $ java -classpath sl.jar:testng.jar org.testng.TestNG testng-single.yaml
2110 <!-------------------------------------
2112 ------------------------------------>
2114 <h4><a class="section" indent=".." name="dependency-injection">Dependency injection</a></h4>
2118 <h5><a class="section" indent="..." name="native-dependency-injection">Native dependency injection<…
2165 <h5><a class="section" indent="..." name="guice-dependency-injection">Guice dependency injection</a…
2230 You will get even more flexibility and Guice power with <tt>parent-module</tt> and <tt>guice-stage<…
2231 <tt>guice-stage</tt> allow you to chose the <a href="https://github.com/google/guice/wiki/Bootstrap…
2233 Here is how you can define parent-module in your test.xml file:
2236 <suite parent-module="com.example.SuiteParenModule" guice-stage="PRODUCTION">
2242 …ach you can declare all common bindings in parent-module also you can inject binding declared in p…
2275 <suite parent-module="com.example.ParentModule">
2296 …into TestModule class, which also declare binding for MySession. Then parent-module in test XML fi…
2297 * MyService - binding taken from ParentModule
2298 * MySession - binding taken from TestModule
2301 <!-------------------------------------
2303 ------------------------------------>
2316 and declare it as a listener, as explained in <a href="#testng-listeners">the section about TestNG …
2321 <!-------------------------------------
2323 ------------------------------------>
2347 <!-------------------------------------
2349 ------------------------------------>
2364 Please refer to <a href="#testng-listeners">Listeners section</a> to learn about listeners.
2382 <li>Through a <a href="#listeners-service-loader">Service Loader</a></li>
2387 <!------------------------------------
2389 ------------------------------------>
2391 <h3><a class="section" indent="." name="test-results">Test results</a></h3>
2394 <h4><a class="section" indent=".." name="success-failure">Success, failure and assert</a></h4>
2405 mark the method as failed (remember to use -ea on the JVM if you are not seeing
2419 import static org.testng.AssertJUnit.*;
2426 <p>Note that the above code use a static import in order to be able to use the
2429 <!-------------------------------------
2431 ------------------------------------>
2440 <a href="http://testng.org/test-output/index.html">here</a>.
2446 …ou should probably use an <tt>IReporter</tt>. If you'd like to write a real-time reporting of you…
2448 <h5><a class="section" indent="..." name="logging-listeners">Logging Listeners</a></h5>
2487 java -classpath testng.jar;%CLASSPATH% org.testng.TestNG -listener org.testng.reporters.DotTestList…
2508 Note that when you use <tt>-listener</tt>, TestNG will automatically determine the type of listener…
2510 <h5><a class="section" indent="..." name="logging-reporters">Logging Reporters</a></h5>
2522 <h5><a class="section" indent="..." name="logging-junitreports">JUnitReports</a></h5>
2528 … that can then be fed to JUnitReport. <a href="http://testng.org/test-report/junit-noframes.html">
2534 <junitreport todir="test-report">
2535 <fileset dir="test-output">
2539 <report format="noframes" todir="test-report"/>
2549 <h5><a class="section" indent="..." name="logging-reporter-api">Reporter API</a></h5>
2561 <img src="pics/show-output1.png" />
2562 <img src="pics/show-output2.png" />
2566 <h5><a class="section" indent="..." name="logging-xml-reports">XML Reports</a></h5>
2569 …ul when the user's test environment needs to consume XML results with TestNG-specific data that th…
2573 <testng-results>
2586 …<test-method status="FAIL" signature="test1()" name="test1" durat…
2587 started-at="2007-05-28T12:14:37Z" description="someDescription2"
2588 finished-at="2007-05-28T12:14:37Z">
2590 <short-stacktrace>
2595 </short-stacktrace>
2597 </test-method>
2598 …<test-method status="PASS" signature="test2()" name="test2" durat…
2599 started-at="2007-05-28T12:14:37Z" description="someDescription1"
2600 finished-at="2007-05-28T12:14:37Z">
2601 </test-method>
2602 …<test-method status="PASS" signature="setUp()" name="setUp" is-co…
2603 … started-at="2007-05-28T12:14:37Z" finished-at="2007-05-28T12:14:37Z">
2604 </test-method>
2608 </testng-results>
2626 <td>yyyy-MM-dd'T'HH:mm:ss'Z'</td>
2633 1 - will generate all the results in one file.
2634 2 - each suite is generated in a separate XML file that is linked to the main file.
2635 3 - same as 2 plus separate files for test-cases that are referenced from the suite files.
2649 …ting if a <tt>groups</tt> attribute should be generated for the <tt><test-method></tt> eleme…
2650 …straight-forward method of retrieving the groups that include a test method without having to surf…
2657 …an <tt><attributes></tt> tag should be generated for each <tt><test-method></tt> eleme…
2668 0 - no stacktrace (just Exception class and message).
2669 1 - a short version of the stack trace keeping just a few lines from the top
2670 2 - the complete stacktrace with all the inner exceptions
2671 3 - both short and long stacktrace
2678 …te to enable/disable the generation of a <tt>depends-on-methods</tt> attribute for the <tt><tes…
2684 …<td>Enable/disable the generation of a <tt>depends-on-groups</tt> attribute for the <tt><test-m…
2690 …In order to configure this reporter you can use the <tt>-reporter</tt> option in the command line …
2692 …Please note that you cannot configure the built-in reporter because this one will only use default…
2696 <!------------------------------------
2698 ------------------------------------>
2705 <!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
2707 <suite name="SingleSuite" verbose="2" thread-count="4" >
2731 - name: Regression2
2735 - test.listeners.ResultEndMillisTest
2742 …ug-in. You can find more information about YAML and TestNG in this <a href="http://beust.com/weblo…
2745 <!---------------------------------------------------------------------->
2747 <a name="testng-dtd">
2752 Eclipse plug-in.</li><li><a href="http://beust.com/j15">J15</a>: an Eclipse plug-in to help
2754 …XDoclet with an easy plug-in architecture.</li><li><a href="http://beust.com/canvas">Canvas</a>:&n…
2758 <script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
2761 _uacct = "UA-238215-2";