Running all child packages

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

Running all child packages

Felipe Santos-6
I am trying to select a package, but run all tests within the child
packages too.

Is this possible or do I need to specify each package one by one?

Thanks in adavance.

--
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
|

Program Dies sometime between Call to Method my Method Depends on and my Method

Kevin Simonson
Hello all,

I have two files with test methods, "Cet.java" and "Mqt.java", that I've listed below.  When I bring them up in IntelliJ, set a breakpoint on the single {println} in {Huh()} in "Cet.java", set another breakpoint at the end of {pb()} in "Mqt.java", and right-click over my {Huh()} method and select <Debug "huh()">, I reach the breakpoint in {pb()} three times.  The third time when I click on the little green arrow a message comes up immediately in my <Variables> window saying
"(i) Disconnected from the target VM, address: '127.0.0.1:62701', transport 'socket'"; and then the large green arrow comes up, signaling that my program isn't executing any more.  Can anybody tell me why execution never comes to the breakpoint in {Huh()}?

It certainly looks to me like this has to be a problem with TestNG, because {pb()} exits normally, and the next thing that should happen is that {huh()} should execute, shouldn't it?

Kevin Simonson

Mqt.java:

package org.familysearch.cds.acceptance;

import java.io.PrintStream;
import java.io.File;
import java.util.Iterator;

import static org.testng.Assert.*;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.DataProvider;

@Test(singleThreaded = true, groups = { "t.q" })
public class Mqt {

private static final PrintStream SY_O = System.out;

private static int jqzCount = 0;

  public Mqt() {

  }

  @BeforeClass
  public void setUp() throws Exception {
  }

  /**
   * Check that the server is up and running and can handle requests.
   *
   * @throws Exception
   */
  @Test(groups = { "i.s" }, timeOut = 60000L)
  public void tss() throws Exception {
  }

  @Test(dataProvider = "p", groups = { "i.p" }, dependsOnGroups = { "i.s" }, timeOut = 30000L)
  public void pp(String pId, String cId, String p) throws Exception {
  }

  @Test(dataProvider = "b", groups = { "i.b" }, dependsOnGroups = { "i.p" },timeOut = 120000L)
  public void pb(String cId, File b) throws Exception {

    SY_O.println( "jqzCount: " + jqzCount++ + '.');
  }

  @DataProvider(name = "p")
  public Object[][] gpd() throws Exception {

    int index;
    Object[][] result = new Object[3][];

    for(index = 0; index < 3; index++) {
      String pId = "pi_" + index;
      String p = "p_" + index;
      String cId = "c_" + index;
      result[index] = new Object[] { pId, cId, p };
    }

    return result;
  }

  private class BaIterator implements Iterator< Object> {

      int index;

      private BaIterator () {

          index = 0;
      }

      public boolean hasNext () {

          return index < 3;
      }

      public Object next () {

          File file = null;
          index++;
          return new Object[] { "cl_" + index, file };
      }

      public void remove () {
      }
  }

  @DataProvider(name = "b")
  public Iterator<Object> getBatchData() {
    return new BaIterator();
  }
}

Cet.java:

package org.familysearch.cds.acceptance;

import java.io.PrintStream;
import org.testng.annotations.Test;

/**
 * Created by IntelliJ IDEA.
 * User: kvnsmnsn
 * Date: 3/6/12
 * Time: 1:18 PM
 * To change this template use File | Settings | File Templates.
 */
public class Cet {

    private static final PrintStream SY_O = System.out;

    @Test(dependsOnGroups = { "t.q"})
    public void huh () {

        SY_O.println( "In method {huh()}.");
    }

}


 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: Program Dies sometime between Call to Method my Method Depends on and my Method

Kevin Simonson
Something has just occurred to me.  How can I tell whether the three test methods in "Mqt.java" passed or not?  If they didn't pass, would that prevent {huh()} from running?

Kevin Simonson


-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Kevin Simonson
Sent: Tuesday, March 06, 2012 2:25 PM
To: [hidden email]
Subject: [testng-users] Program Dies sometime between Call to Method my Method Depends on and my Method

Hello all,

I have two files with test methods, "Cet.java" and "Mqt.java", that I've listed below.  When I bring them up in IntelliJ, set a breakpoint on the single {println} in {Huh()} in "Cet.java", set another breakpoint at the end of {pb()} in "Mqt.java", and right-click over my {Huh()} method and select <Debug "huh()">, I reach the breakpoint in {pb()} three times.  The third time when I click on the little green arrow a message comes up immediately in my <Variables> window saying
"(i) Disconnected from the target VM, address: '127.0.0.1:62701', transport 'socket'"; and then the large green arrow comes up, signaling that my program isn't executing any more.  Can anybody tell me why execution never comes to the breakpoint in {Huh()}?

It certainly looks to me like this has to be a problem with TestNG, because {pb()} exits normally, and the next thing that should happen is that {huh()} should execute, shouldn't it?

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.