Odd that I'm not Hearing from Anyone

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Odd that I'm not Hearing from Anyone

Kevin Simonson

On Tuesday I e-mailed out an article with subject line “Program Dies sometime between Call to Method my Method Depends on and my Method”.  Here it is Thursday and nobody has replied to it yet.  That seemed odd because usually people get quick responses to their e-mails.  Did anyone see the e-mail I’m referring to?  It’s about TestNG as used on IntelliJ.  Is IntelliJ so hard to figure out that nobody can think of any pointers to give me?

 

Kevin Simonson

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Odd that I'm not Hearing from Anyone

Cédric Beust ♔-2
Hi Kevin,

I saw your message but I don't have an answer for you. Since it seems to be an IDEA-specific idea, maybe you could try asking on their forums?

-- 
Cédric




On Thu, Mar 8, 2012 at 1:47 PM, Kevin Simonson <[hidden email]> wrote:

On Tuesday I e-mailed out an article with subject line “Program Dies sometime between Call to Method my Method Depends on and my Method”.  Here it is Thursday and nobody has replied to it yet.  That seemed odd because usually people get quick responses to their e-mails.  Did anyone see the e-mail I’m referring to?  It’s about TestNG as used on IntelliJ.  Is IntelliJ so hard to figure out that nobody can think of any pointers to give me?

 

Kevin Simonson

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


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

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

RE: Odd that I'm not Hearing from Anyone

Kevin Simonson

My mentor is of the opinion that it’s a problem with TestNG, not a problem with IntelliJ.  He suggested that I attempt to run my test from the command line to verify one way or the other.  Obviously if it works when I execute it from the command line then it would be a problem with IntelliJ, whereas if I got the same behavior when I execute it from the command line then it would point to a problem with TestNG.

 

So my mentor showed me how to create a “.jar” file that included everything (he told me) my test depended on, and at the command prompt I typed in:

 

Java –cp target/cds-acceptance-tests-2.0-SNAPSHOT-jar-with-dependencies.jar org.testng.TestNG src\test\testng\testng.xml

 

My computer responded with:

 

Exception in thread “main” java.lang.NoClassDefFoundError: org/testng/TestNG

Caused by: java.lang.ClassNotFoundException: org.testng.TestNG

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Could not find the main class: org.testng.TestNG.  Program will exit.

 

So apparently no TestNG code got included in this “.jar” file.  But TestNG has to exist somewhere, since my code uses it.  Can you give me any suggestions as to how I might locate the TestNG executable so that I can run it from the command line and resolve the question of where the problem is for once and for all?

 

Kevin Simonson

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Cédric Beust ?
Sent: Thursday, March 08, 2012 2:52 PM
To: [hidden email]
Subject: Re: [testng-users] Odd that I'm not Hearing from Anyone

 

Hi Kevin,

 

I saw your message but I don't have an answer for you. Since it seems to be an IDEA-specific idea, maybe you could try asking on their forums?


-- 

Cédric



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Odd that I'm not Hearing from Anyone

Cédric Beust ♔-2
The jars downloaded by Maven never contain dependencies, so this is not surprising. The easiest way to build your own jar with all the dependencies would be to clone the repo yourself and build TestNG:

cd testng
cp ivy-2.1.0.jar ~/.ant/lib
ant

This should create target/testng-6.5beta.jar.

-- 
Cédric




On Thu, Mar 8, 2012 at 3:33 PM, Kevin Simonson <[hidden email]> wrote:

My mentor is of the opinion that it’s a problem with TestNG, not a problem with IntelliJ.  He suggested that I attempt to run my test from the command line to verify one way or the other.  Obviously if it works when I execute it from the command line then it would be a problem with IntelliJ, whereas if I got the same behavior when I execute it from the command line then it would point to a problem with TestNG.

 

So my mentor showed me how to create a “.jar” file that included everything (he told me) my test depended on, and at the command prompt I typed in:

 

Java –cp target/cds-acceptance-tests-2.0-SNAPSHOT-jar-with-dependencies.jar org.testng.TestNG src\test\testng\testng.xml

 

My computer responded with:

 

Exception in thread “main” java.lang.NoClassDefFoundError: org/testng/TestNG

Caused by: java.lang.ClassNotFoundException: org.testng.TestNG

        at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

        at java.security.AccessController.doPrivileged(Native Method)

        at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:307)

        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Could not find the main class: org.testng.TestNG.  Program will exit.

 

So apparently no TestNG code got included in this “.jar” file.  But TestNG has to exist somewhere, since my code uses it.  Can you give me any suggestions as to how I might locate the TestNG executable so that I can run it from the command line and resolve the question of where the problem is for once and for all?

 

Kevin Simonson

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Cédric Beust ?
Sent: Thursday, March 08, 2012 2:52 PM
To: [hidden email]
Subject: Re: [testng-users] Odd that I'm not Hearing from Anyone

 

Hi Kevin,

 

I saw your message but I don't have an answer for you. Since it seems to be an IDEA-specific idea, maybe you could try asking on their forums?


-- 

Cédric



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


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

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

RE: Odd that I'm not Hearing from Anyone

Kevin Simonson

Cedric,

 

In order to build my own jar as you suggested I had to download “git” which I did, and I was able to execute the “git clone” command.  I also had to download “ant”.  Currently I have an “apache-ant-1.8.3-bin.zip” file in my “Downloads” directory that I expanded, and that gave me an “apache-ant-1.8.3” directory with a lot of things under it.  Do you know what I need to do in order to be able to execute the “ant” command you listed?  I’m on a Windows 7 machine.  I copied “ivy-2.1.0.jar” to “\Users\kvnsmnsn\.ant\lib” and then typed in “ant”, and my O/S told me “’ant’ is not recognized as an internal or external command, operable program or batch file.”

 

Kevin Simonson

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Cédric Beust ?
Sent: Thursday, March 08, 2012 4:40 PM
To: [hidden email]
Subject: Re: [testng-users] Odd that I'm not Hearing from Anyone

 

The jars downloaded by Maven never contain dependencies, so this is not surprising. The easiest way to build your own jar with all the dependencies would be to clone the repo yourself and build TestNG:

 

cd testng

cp ivy-2.1.0.jar ~/.ant/lib

ant

 

This should create target/testng-6.5beta.jar.


-- 

Cédric

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

RE: Odd that I'm not Hearing from Anyone

Kevin Simonson
In reply to this post by Cédric Beust ♔-2

Cedric,

 

Okay, never mind that last e-mail.  I went looking on the Internet and figured out how to install “ant”.  I copied the “.jar” file with all my dependencies, and the “testng-6.5beta.jar” file to a local directory, and also brought in a “testng.xml” file with contents:

 

<suite name="jbTest">

  <test name="jbTest">

    <classes>

      <class name="org.familysearch.cds.acceptance.Mqt" />

      <class name="org.familysearch.cds.acceptance.Cet" />

    </classes>

    <groups>

      <run>

        <include name="t.mp" />

      </run>

    </groups>

  </test>

</suite>

 

and then I typed in command:

 

java –cp testng-6.5beta.jar;cds-acceptance-tests-2.0-SNAPSHOT-jar-with-dependencies.jar;C:\Sandbox\sourceCode4\cds2-root\cds-acceptance-tests\target\test-classes org.testng.TestNG testng.xml

 

and my JVM told me:

 

[TestNG] Running:

  C:\Users\kvnsmnsn\K\Test\Tng\Jars\testng.xml

 

[TestNG] [ERROR]

Method “Cet.huh()[pri:0, instance:org.familysearch.cds.acceptance.Cet@603b1d04]” depends on nonexistent group “t.q”

 

I’m not sure I understand what this means.  I have group “t.q” defined in my “Mqt.java” file.  Why is this saying “t.q” is nonexistent?

 

Kevin Simonson

 

From: Kevin Simonson
Sent: Friday, March 09, 2012 8:46 AM
To: '[hidden email]'
Subject: RE: [testng-users] Odd that I'm not Hearing from Anyone

 

Cedric,

 

In order to build my own jar as you suggested I had to download “git” which I did, and I was able to execute the “git clone” command.  I also had to download “ant”.  Currently I have an “apache-ant-1.8.3-bin.zip” file in my “Downloads” directory that I expanded, and that gave me an “apache-ant-1.8.3” directory with a lot of things under it.  Do you know what I need to do in order to be able to execute the “ant” command you listed?  I’m on a Windows 7 machine.  I copied “ivy-2.1.0.jar” to “\Users\kvnsmnsn\.ant\lib” and then typed in “ant”, and my O/S told me “’ant’ is not recognized as an internal or external command, operable program or batch file.”

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Odd that I'm not Hearing from Anyone

Cédric Beust ♔-2
Because you are only including one method in testng.xml, so TestNG isn't seeing anything else.

-- 
Cédric




On Fri, Mar 9, 2012 at 9:37 AM, Kevin Simonson <[hidden email]> wrote:

Cedric,

 

Okay, never mind that last e-mail.  I went looking on the Internet and figured out how to install “ant”.  I copied the “.jar” file with all my dependencies, and the “testng-6.5beta.jar” file to a local directory, and also brought in a “testng.xml” file with contents:

 

<suite name="jbTest">

  <test name="jbTest">

    <classes>

      <class name="org.familysearch.cds.acceptance.Mqt" />

      <class name="org.familysearch.cds.acceptance.Cet" />

    </classes>

    <groups>

      <run>

        <include name="t.mp" />

      </run>

    </groups>

  </test>

</suite>

 

and then I typed in command:

 

java –cp testng-6.5beta.jar;cds-acceptance-tests-2.0-SNAPSHOT-jar-with-dependencies.jar;C:\Sandbox\sourceCode4\cds2-root\cds-acceptance-tests\target\test-classes org.testng.TestNG testng.xml

 

and my JVM told me:

 

[TestNG] Running:

  C:\Users\kvnsmnsn\K\Test\Tng\Jars\testng.xml

 

[TestNG] [ERROR]

Method “Cet.huh()[pri:0, instance:org.familysearch.cds.acceptance.Cet@603b1d04]” depends on nonexistent group “t.q”

 

I’m not sure I understand what this means.  I have group “t.q” defined in my “Mqt.java” file.  Why is this saying “t.q” is nonexistent?

 

Kevin Simonson

 

From: Kevin Simonson
Sent: Friday, March 09, 2012 8:46 AM
To: '[hidden email]'
Subject: RE: [testng-users] Odd that I'm not Hearing from Anyone

 

Cedric,

 

In order to build my own jar as you suggested I had to download “git” which I did, and I was able to execute the “git clone” command.  I also had to download “ant”.  Currently I have an “apache-ant-1.8.3-bin.zip” file in my “Downloads” directory that I expanded, and that gave me an “apache-ant-1.8.3” directory with a lot of things under it.  Do you know what I need to do in order to be able to execute the “ant” command you listed?  I’m on a Windows 7 machine.  I copied “ivy-2.1.0.jar” to “\Users\kvnsmnsn\.ant\lib” and then typed in “ant”, and my O/S told me “’ant’ is not recognized as an internal or external command, operable program or batch file.”

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


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

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

RE: Odd that I'm not Hearing from Anyone

Kevin Simonson

Cedric,

 

Thanks!  I put the test groups the other methods were in in the “testng.xml” file, and everything worked just fine.  So it is an IntelliJ problem.

 

Kevin Simonson

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Cédric Beust ?
Sent: Friday, March 09, 2012 10:39 AM
To: [hidden email]
Subject: Re: [testng-users] Odd that I'm not Hearing from Anyone

 

Because you are only including one method in testng.xml, so TestNG isn't seeing anything else.


-- 

Cédric

 



NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.


--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Odd that I'm not Hearing from Anyone

Mark Derricutt
In reply to this post by Kevin Simonson
Given this jar name you have here, I'm guessing you're using maven, and the maven assembly plugin to generate an uber-jar,   such an uber jar normally only contains your <scope>compile</scope> dependencies, and NOT any <scope>test</scope> jars, are you declaring testng as a test scope by any chance?

If anything - this sounds like a maven issue, rather than a TestNG or IntelliJ one...

--
"Great artists are extremely selfish and arrogant things" — Steven Wilson, Porcupine Tree



On Fri, Mar 9, 2012 at 12:33 PM, Kevin Simonson <[hidden email]> wrote:

Java –cp target/cds-acceptance-tests-2.0-SNAPSHOT-jar-with-dependencies.jar org.testng.TestNG src\test\testng\testng.xml


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