[testng] 307/355: add doc for guice stage

Eugene Zhukov eugene-guest at moszumanska.debian.org
Tue Aug 18 10:20:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.

commit d489054b6dd3e02d824c7bf791049048a8e2912f
Author: cguillaume <cguillaume at hotpads.com>
Date:   Sat May 9 15:25:54 2015 -0700

    add doc for guice stage
---
 CHANGES.txt                       | 1 +
 doc/documentation-main.html       | 7 +++++--
 src/main/resources/testng-1.0.dtd | 3 +++
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/CHANGES.txt b/CHANGES.txt
index 7384263..06903fe 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -27,6 +27,7 @@ Fixed: GITHUB-353: Typo in documentation (Jan Święcki)
 Fixed: GITHUB-656: Upgrade to JCommander 1.48 (Ryan Schmitt)
 Fixed: GITHUB-582: TestNG tests don't pass reliably on JDK8 (Ryan Schmitt)
 New: GITHUB-645: TestNG project on Google Code redirect to GitHub
+New: GITHUB-663: Add Guice Stage configuration for a suite (Clément Guillaume)
 
 6.8.21:
 2015/02/02
diff --git a/doc/documentation-main.html b/doc/documentation-main.html
index e816bb3..598f33d 100644
--- a/doc/documentation-main.html
+++ b/doc/documentation-main.html
@@ -2227,10 +2227,13 @@ public interface IModuleFactory {
 
 Your factory will be passed an instance of the test context and the test class that TestNG needs to instantiate. Your <tt>createModule</tt> method should return a Guice Module that will know how to instantiate this test class. You can use the test context to find out more information about your environment, such as parameters specified in <tt>testng.xml</tt>, etc...
 
-You will get even more flexibility and Guice power with parent-module suite parameter. Here is how you can define parent-module in your test.xml file:
+You will get even more flexibility and Guice power with <tt>parent-module</tt> and <tt>guice-stage</tt> suite parameters.
+<tt>guice-stage</tt> allow you to chose the <a href="https://github.com/google/guice/wiki/Bootstrap"><tt>Stage</tt></a> used to create the parent injector.
+The default one is <tt>DEVELOPMENT</tt>.
+Here is how you can define parent-module in your test.xml file:
 
 <pre class="brush: xml">
-<suite parent-module="com.example.SuiteParenModule">
+<suite parent-module="com.example.SuiteParenModule" guice-stage="PRODUCTION">
 </suite>
 </pre>
 
diff --git a/src/main/resources/testng-1.0.dtd b/src/main/resources/testng-1.0.dtd
index 7993989..ef435cc 100755
--- a/src/main/resources/testng-1.0.dtd
+++ b/src/main/resources/testng-1.0.dtd
@@ -40,6 +40,9 @@ Cedric Beust & Alexandru Popescu
                 This setting has no impact on the HTML reports.
 @attr  parallel   Whether TestNG should use different threads
                 to run your tests (might speed up the process)
+ at attr  parent-module A module used to create the parent injector of all guice injectors used
+       in tests of the suite
+ at attr  guice-stage The stage with which the parent injector is created
 @attr  configfailurepolicy  Whether to continue attempting Before/After
                 Class/Methods after they've failed once or just skip remaining.
 @attr  thread-count An integer giving the size of the thread pool to use

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git



More information about the pkg-java-commits mailing list