Sorce code for released versions

View: New views
9 Messages — Rating Filter:   Alert me  

Sorce code for released versions

by Mats-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Is it possible to get the source code for a released version of this
plugin? From what I can tell it is only possible to check out the
trunk.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Cédric Beust ♔ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Mats,

On Mon, Nov 9, 2009 at 12:39 AM, Mats <mansica@...> wrote:

Is it possible to get the source code for a released version of this
plugin? From what I can tell it is only possible to check out the
trunk.

You are right, I haven't been very good at using tags for the Eclipse plug-in repository, sorry about that.

What are you trying to do?

--
Cédric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Mats-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I want to add a button/action/command that automatically creates a test configuration with customizable JVM-arguments. I dont want to change the behaviour of the current "Run as test" but to add this possibility. I checked out the trunk but get an error when I run testng. It complains about not finding a suite or something like that. I dont know if it is the plugin or testng that fails. 

//Mats

9 nov 2009 kl. 17.10 skrev Cédric Beust ♔ <cbeust@...>:

Hi Mats,

On Mon, Nov 9, 2009 at 12:39 AM, Mats <mansica@...> wrote:

Is it possible to get the source code for a released version of this
plugin? From what I can tell it is only possible to check out the
trunk.

You are right, I haven't been very good at using tags for the Eclipse plug-in repository, sorry about that.

What are you trying to do?

--
Cédric



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Cédric Beust ♔ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Mon, Nov 9, 2009 at 8:42 AM, Mats Nilsson <mansica@...> wrote:
I want to add a button/action/command that automatically creates a test configuration with customizable JVM-arguments. I dont want to change the behaviour of the current "Run as test" but to add this possibility. I checked out the trunk but get an error when I run testng. It complains about not finding a suite or something like that. I dont know if it is the plugin or testng that fails. 

So why do you think you need to check out a specific version of the plug-in?  Why not get the latest trunk?

--
Cédric

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Mats-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Because I cant get the trunk to work. It complains about not finding a suite file. I get that behaviour straight out of the checked out trunk(without modification) and independent if I choose "Run as test" or creates a suite file and "Run suite".
I guess it can be because of TestNG and not because of the plugin but I'm not sure.

2009/11/9 Cédric Beust ♔ <cbeust@...>


On Mon, Nov 9, 2009 at 8:42 AM, Mats Nilsson <mansica@...> wrote:
I want to add a button/action/command that automatically creates a test configuration with customizable JVM-arguments. I dont want to change the behaviour of the current "Run as test" but to add this possibility. I checked out the trunk but get an error when I run testng. It complains about not finding a suite or something like that. I dont know if it is the plugin or testng that fails. 

So why do you think you need to check out a specific version of the plug-in?  Why not get the latest trunk?

--
Cédric




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Cédric Beust ♔ :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



On Mon, Nov 9, 2009 at 12:13 PM, Mats Nilsson <mansica@...> wrote:
Because I cant get the trunk to work. It complains about not finding a suite file. I get that behaviour straight out of the checked out trunk(without modification) and independent if I choose "Run as test" or creates a suite file and "Run suite".
I guess it can be because of TestNG and not because of the plugin but I'm not sure.

Can you be more specific and explain your steps to reproduce this problem?  I'm not sure if you are talking about building the plug-in, or running it in PDE, or...

--
Cédric 

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by Mats-12 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Ok I will try to explain what I'm trying to do, step by step.

* Check out the trunk
* Import project in eclipse
* Testing plugin by launching a separate application
* Create a project with a class and corresponding test class
* Right-click on test class and choose "Run as->TestNg Test"

This results in this warning:

WARNING: No test suite found.  Nothing to run

2009/11/9 Cédric Beust ♔ <cbeust@...>


On Mon, Nov 9, 2009 at 12:13 PM, Mats Nilsson <mansica@...> wrote:
Because I cant get the trunk to work. It complains about not finding a suite file. I get that behaviour straight out of the checked out trunk(without modification) and independent if I choose "Run as test" or creates a suite file and "Run suite".
I guess it can be because of TestNG and not because of the plugin but I'm not sure.

Can you be more specific and explain your steps to reproduce this problem?  I'm not sure if you are talking about building the plug-in, or running it in PDE, or...

--
Cédric 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@...
To unsubscribe from this group, send email to testng-dev+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: Sorce code for released versions

by alex-573 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Looks like TestNG plug-in does not support testng.jar newer then 5.9.1
To reproduce this issue:
1) Prepare lib directory with two versions of testng-jdk15.jar
 - one with version from plugin lib directory: eclipse\plugins
\org.testng.eclipse_5.9.0.5\lib\testng-jdk15.jar.
   rename it to: testng-5.9.1beta-jdk15.jar
 - second one from testng-5.10:  testng-5.10-jdk15.jar
2) Add testng-5.9.1beta-jdk15.jar to project build path.
3) Set  use project TestNG check box in project properties
4) Run any test. Should be PASSED
5) change project build path from testng-5.9.1beta-jdk15.jar to
testng-5.10-jdk15.jar
6) Rerun the same test. Should be FAIL

Alex

On Nov 10, 2:30 am, Mats Nilsson <mans...@...> wrote:

> Ok I will try to explain what I'm trying to do, step by step.
>
> * Check out the trunk
> * Import project in eclipse
> * Testing plugin by launching a separate application
> * Create a project with a class and corresponding test class
> * Right-click on test class and choose "Run as->TestNg Test"
>
> This results in this warning:
>
> WARNING: No test suite found.  Nothing to run
>
> 2009/11/9 Cédric Beust ♔ <cbe...@...>
>
>
>
> > On Mon, Nov 9, 2009 at 12:13 PM, Mats Nilsson <mans...@...> wrote:
>
> >> Because I cant get the trunk to work. It complains about not finding a
> >> suite file. I get that behaviour straight out of the checked out
> >> trunk(without modification) and independent if I choose "Run as test" or
> >> creates a suite file and "Run suite".
> >> I guess it can be because of TestNG and not because of the plugin but I'm
> >> not sure.
>
> > Can you be more specific and explain your steps to reproduce this problem?
> > I'm not sure if you are talking about building the plug-in, or running it in
> > PDE, or...
>
> > --
> > Cédric

--

You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@....
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=.



Re: Sorce code for released versions

by alex-573 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

testng_eclipse plugin 5.9.0.5 can work only with testng-jdk15.jar till
714 revision.
Below is changes with 715 revision: ( the first revision which does
not work with eclipse plugin )

Index: trunk/src/main/org/testng/TestNG.java
===================================================================
--- trunk/src/main/org/testng/TestNG.java (revision 714)
+++ trunk/src/main/org/testng/TestNG.java (revision 715)
@@ -162,6 +162,10 @@
     = new ArrayList<IInvokedMethodListener>();

   private Integer m_dataProviderThreadCount = null;
+
+  private String m_jarPath;
+
+  private List<String> m_stringSuites = new ArrayList<String>();

   /**
    * Default constructor. Setting also usage of default listeners/
reporters.
@@ -315,13 +319,56 @@
    * @param jarPath
    */
   public void setTestJar(String jarPath) {
-    if ((null == jarPath) || "".equals(jarPath)) {
+    m_jarPath = jarPath;
+  }
+
+  public void initializeSuitesAndJarFile() {
+    //
+    // Parse the suites that were passed on the command line
+    //
+    for (String suiteXmlPath : m_stringSuites) {
+      if(LOGGER.isDebugEnabled()) {
+        LOGGER.debug("suiteXmlPath: \"" + suiteXmlPath + "\"");
+      }
+      try {
+        Collection<XmlSuite> allSuites = new Parser
(suiteXmlPath).parse();
+        for (XmlSuite s : allSuites) {
+          m_suites.add(s);
+        }
+      }
+      catch(FileNotFoundException e) {
+        e.printStackTrace(System.out);
+      }
+      catch(IOException e) {
+        e.printStackTrace(System.out);
+      }
+      catch(ParserConfigurationException e) {
+        e.printStackTrace(System.out);
+      }
+      catch(SAXException e) {
+        e.printStackTrace(System.out);
+      }
+    }
+
+    //
+    // jar path
+    //
+    // If suites were passed on the command line, they take
precedence over the suite file
+    // inside that jar path
+    if (m_jarPath != null && m_stringSuites.size() > 0) {
+      StringBuilder suites = new StringBuilder();
+      for (String s : m_stringSuites) {
+        suites.append(s);
+      }
+      Utils.log("TestNG", 2, "Ignoring the XML file inside " +
m_jarPath + " and using "
+          + suites + " instead");
       return;
     }
+    if ((null == m_jarPath) || "".equals(m_jarPath)) return;

-    File jarFile = new File(jarPath);
+    // We have a jar file and no XML file was specified: try to find
an XML file inside the jar
+    File jarFile = new File(m_jarPath);

-
     try {
       URL jarfileUrl = jarFile.getCanonicalFile().toURI().toURL();
       URLClassLoader jarLoader = new URLClassLoader(new URL[]
{ jarfileUrl });
@@ -505,29 +552,7 @@
    * </pre>
    */
   public void setTestSuites(List<String> suites) {
-    for (String suiteXmlPath : suites) {
-      if(LOGGER.isDebugEnabled()) {
-        LOGGER.debug("suiteXmlPath: \"" + suiteXmlPath + "\"");
-      }
-      try {
-        Collection<XmlSuite> allSuites = new Parser
(suiteXmlPath).parse();
-        for (XmlSuite s : allSuites) {
-          m_suites.add(s);
-        }
-      }
-      catch(FileNotFoundException e) {
-        e.printStackTrace(System.out);
-      }
-      catch(IOException e) {
-        e.printStackTrace(System.out);
-      }
-      catch(ParserConfigurationException e) {
-        e.printStackTrace(System.out);
-      }
-      catch(SAXException e) {
-        e.printStackTrace(System.out);
-      }
-    }
+    m_stringSuites = suites;
   }

   /**
@@ -736,6 +761,7 @@
    * Run TestNG.
    */
   public void run() {
+    initializeSuitesAndJarFile();
     initializeListeners();
     initializeCommandLineSuites();
     initializeCommandLineSuitesParams();



On Nov 19, 10:31 am, alex <alexey.an...@...> wrote:

> Looks like TestNG plug-in does not support testng.jar newer then 5.9.1
> To reproduce this issue:
> 1) Prepare lib directory with two versions of testng-jdk15.jar
>  - one with version from plugin lib directory: eclipse\plugins
> \org.testng.eclipse_5.9.0.5\lib\testng-jdk15.jar.
>    rename it to: testng-5.9.1beta-jdk15.jar
>  - second one from testng-5.10:  testng-5.10-jdk15.jar
> 2) Add testng-5.9.1beta-jdk15.jar to project build path.
> 3) Set  use project TestNG check box in project properties
> 4) Run any test. Should be PASSED
> 5) change project build path from testng-5.9.1beta-jdk15.jar to
> testng-5.10-jdk15.jar
> 6) Rerun the same test. Should be FAIL
>
> Alex
>
> On Nov 10, 2:30 am, Mats Nilsson <mans...@...> wrote:
>
> > Ok I will try to explain what I'm trying to do, step by step.
>
> > * Check out the trunk
> > * Import project in eclipse
> > * Testing plugin by launching a separate application
> > * Create a project with a class and corresponding test class
> > * Right-click on test class and choose "Run as->TestNg Test"
>
> > This results in this warning:
>
> > WARNING: No test suite found.  Nothing to run
>
> > 2009/11/9 Cédric Beust ♔ <cbe...@...>
>
> > > On Mon, Nov 9, 2009 at 12:13 PM, Mats Nilsson <mans...@...> wrote:
>
> > >> Because I cant get the trunk to work. It complains about not finding a
> > >> suite file. I get that behaviour straight out of the checked out
> > >> trunk(without modification) and independent if I choose "Run as test" or
> > >> creates a suite file and "Run suite".
> > >> I guess it can be because of TestNG and not because of the plugin but I'm
> > >> not sure.
>
> > > Can you be more specific and explain your steps to reproduce this problem?
> > > I'm not sure if you are talking about building the plug-in, or running it in
> > > PDE, or...
>
> > > --
> > > Cédric

--

You received this message because you are subscribed to the Google Groups "testng-dev" group.
To post to this group, send email to testng-dev@....
To unsubscribe from this group, send email to testng-dev+unsubscribe@....
For more options, visit this group at http://groups.google.com/group/testng-dev?hl=.