Skip to main content

No tests found or selected

23 replies [Last post]
acarito
Offline
Joined: 2007-09-26
Points: 0

I do not see my test and when I try running I get the JT Harness error "Not tests found or selected. Check your configuration settings."

I've sucessfully run the sample demots. This is my first test implementation. I suspect there is something very simple and basic that I missing. Here is what I've done so far.

Thanks,
Allen

====================================================================
Directory layout:
====================================================================
/sandbox/ce/acarito/jtharness/ac2/ac2ts:
ls -lR
.:
total 24
drwxrwxrwx 2 acarito up 4096 Sep 27 2007 lib
drwxrwxrwx 2 acarito up 4096 Sep 27 2007 tests
-rw-r--r-- 1 acarito up 662 Sep 26 12:53 testsuite.jtt

./lib:
total 11016
-rw-r--r-- 1 acarito up 5105518 Sep 26 08:56 javatest.jar
-rw-r--r-- 1 acarito up 504570 Sep 26 08:56 jh.jar
-rw-r--r-- 1 acarito up 11202 Sep 27 2007 jtac2ts.jar

./tests:
total 8
-rw-r--r-- 1 acarito up 549 Sep 26 13:20 Test1.java

==================================================================
jar tvf lib/jtac2ts.jar:
==================================================================
0 Thu Sep 27 03:59:32 PDT 2007 META-INF/
44 Thu Sep 27 03:59:32 PDT 2007 META-INF/MANIFEST.MF
0 Thu Sep 27 04:42:34 PDT 2007 com/openwave/
0 Thu Sep 27 04:53:24 PDT 2007 com/openwave/ac2ts/
1067 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$1.class
1072 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$2.class
840 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$3.class
1101 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$4.class
1911 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$5.class
1031 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$6.class
897 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$7.class
1170 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$8.class
725 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview$9.class
4998 Thu Sep 27 04:42:34 PDT 2007 com/openwave/ac2ts/AC2TSInterview.class
2723 Thu Sep 27 04:43:38 PDT 2007 com/openwave/ac2ts/i18n.properties
0 Thu Sep 27 04:53:24 PDT 2007 com/openwave/ac2ts/tests/
770 Thu Sep 27 04:53:24 PDT 2007 com/openwave/ac2ts/tests/Test1.class

==================================================================
testsuite.jtt:
==================================================================
# TODO - file description

# Test Suite properties file for Demo test suite with tag-style tests

# This file describes fixed properties of the test suite
# and should not normally need to be edited.

# The presentation name of the test suite
name=AC2 Test Suite (Tag Tests)

# The ID for the test suite
id=AC2_tags_1.0

# The jar file containing the test suite's JavaTest plug in classes
classpath=lib/jtac2ts.jar

# The test finder to use
finder=com.sun.javatest.finder.TagTestFinder

# The test script to use
script=com.sun.javatest.lib.StdTestScript

# The configuration interview to use
interview=com.openwave.ac2ts.AC2TSInterview

# No keywords
keywords=

==================================================================
tests/Test1.java:
==================================================================
package com.openwave.ac2ts.tests;

import java.io.PrintWriter;
import com.sun.javatest.Status;
import com.sun.javatest.Test;

/**
* @test
* @executeClass Test1
* @sources Test1.java
**/
public class Test1 implements Test {
public static void main(String[] args) {
PrintWriter err = new PrintWriter(System.err, true);
Test t = new Test1();
Status s = t.run(args, null, err);
s.exit();
}
public Status run(String[] args, PrintWriter out, PrintWriter err) {
Status result;
result = Status.passed("OK");
return result;
}
}

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
acarito
Offline
Joined: 2007-09-26
Points: 0

The behavior is the same with the following:

$ cd ~/jtharness/ac2/ac2ts
$ java -jar lib/javatest.jar -ts .

and

$ java -jar lib/javatest.jar -ts `pwd`

The only path in testsuite.jtt is classpath which is set to "lib/jtac2ts.jar" which I am pretty certain correct, too.

acarito
Offline
Joined: 2007-09-26
Points: 0

HI Roma,

You can download the tar.Z file as follows:

ftp ftp.openwave.com
acarito
#acar1t0!
bin
cd drop
get ac2.tar.Z

Allen

r_zelov
Offline
Joined: 2007-08-07
Points: 0

I have some problems with access to your ftp server.

Could you please give me your email and we will discuss all issues.

bash-2.05$ ftp ftp.openwave.com
ftp.openwave.com: unknown host or invalid literal address
ftp>

Thanks,
Roma

r_zelov
Offline
Joined: 2007-08-07
Points: 0

Allen,

This is bug in Javatest. Javatest can not find tests in root of "tests" directory only in subdirectories. So, there is simple workaround for this issue. Please create subdirectory in "tests" directory and put your source of test to this subdirectory and all will be OK.

>>cd tests
>>mkdir openwave
>>mv Test1.java ./openwave
>>ls
openwave
>>ls openwave
Test1.java

I will file bug. Thanks a lot!

Thanks,
Roma

Message was edited by: r_zelov

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

It sounds like your test suite might be ok.

Just to eliminate startup error, could you please try this:

$ cd ~/jtharness/ac2/ac2ts
$ java -jar lib/javatest.jar -ts .

Alternatively, you can skip the cd part and just do:

java -jar javatest.jar -ts ~/jtharness/ac2/ac2ts
(assuming javatest.jar is in the current directory).

The only other assumption is that ~/jtharness/ac2/ac2ts is the directory where testsuite.jtt is, which it seems to be.

Note that the paths in your jtt file are relative to the location of the jtt, not a cwd. Unless you used absolute paths (which you shouldn't). Your tests directory is ~/jtharness/ac2/ac2ts/tests, right? So ~/jtharness/ac2/ac2ts/tests/Test1.java is a correct path?

That version of the JDK is fine, although as noted in the README, online search highlighting will be broken with that update (12).

acarito
Offline
Joined: 2007-09-26
Points: 0

Hi Roma,

Is there are another way that I can send you the files. I am having some serious challenges send the files including "files to big" and "false thinking that the file contains a virus". I will keep trying to send you the files via mail.

Allen

r_zelov
Offline
Joined: 2007-08-07
Points: 0

Allen,

You can upload your test suite to web archive e.g. http://megaupload.com/ and send me link to file via email. Also I can send you my test suite which is opened by JavaTest. Size of my test suite is about 4Mb. Please give me your email.

Thanks,
Roma

r_zelov
Offline
Joined: 2007-08-07
Points: 0

Allen,

It seems that Java and Javatest version is OK. Your steps are OK too.

It's really strange that test suite is not opened. Could you please send me you test suite with all files (tests, interview, etc.) via email (aritomo.abe dog gmail.com) ?

--Roma

acarito
Offline
Joined: 2007-09-26
Points: 0

Hi Roma,

I've mailed ac2.tar.Z to aritomo.gmail.com which I assume is what you meant by "aritomo.abe dog gmail.com". Please let me know ASAP if you have any problems.

Allen

r_zelov
Offline
Joined: 2007-08-07
Points: 0

I did not receive ac2.tar. Correct email is aritomo.abe@gmail.com

--Roma

acarito
Offline
Joined: 2007-09-26
Points: 0

Roma,

Hmmm, I am still have problems. I've been reading your two other recent posts. I am not able to reproduce your success. Here are the details of my steps:

1. Commented out the interview line as follows:

#interview=com.openwave.ac2ts.AC2TSInterview

2. Entered the following command:

$ cd ~/jtharness/ac2/ac2ts
$ java -jar lib/javatest.jar

3. Select "File -> Open -> TestSuite ...". The following directories are shown: ac2_work,
classes, src, and ac2ts. All have a colored folder icon except ac2ts which contains
the file testsuite.jtt. That one is white. I clicked on that directory and the dialogue
box went away and nothing was seen in the panel.

4. So, then I tried entering the formal full path "/sandbox/ce/acarito/jtharness/ac2/ac2ts/testsuite.jtt" and get the following
JT Harness Error:

Here are some other questions:

1. Am I selecting the test suite correctly? Are there other ways to select the test suite?

2. Am I running the correct version of java? I'm running the following:
java version "1.5.0_12"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04)
Java HotSpot(TM) Server VM (build 1.5.0_12-b04, mixed mode)

3. The JTHarness version is:
JT Harness, version 4.1.1 rel b02
Installed in /sandbox/ce/acarito/jtharness/ac2/ac2ts/lib/javatest.jar
Running on platform version 1.5.0_12 from /opt/jdk1.5.0_12/jre.
Built with Java(TM) 2 SDK, Version 1.5.0 on August 16, 2007.
Copyright (C) 1996-2007 Sun Microsystems, Inc. All rights reserved.
Use is subject to license terms.

Allen

Message was edited by: acarito
-add jtharness version

acarito
Offline
Joined: 2007-09-26
Points: 0

1. Can you provide the steps that you compiled and packaged the tests?

2. Are you compiling and running as root or some other user?

acarito
Offline
Joined: 2007-09-26
Points: 0

I just retried with your latest jtharness, (JT Harness, version 4.1.2 dev b05) and got the same problems. I am still able to see my tests as follows:

java -cp lib/javatest.jar com.sun.javatest.finder.ShowTests -finder com.sun.javatest.finder.TagTestFinder -end -fulltests acts
tests/Test1.java
executeClass com.openwave.acts.tests.Test1
sources Test1.java

Allen

devengupta
Offline
Joined: 2008-06-09
Points: 0

Dear All,

Hi we are working JT Harness 4.3.1. We have made some test cases and we want to run those test cases on JT Harness through Server and Agent setup.

Our JT harness is now running on Windows PC and our target is based on CDC1.1. We have made some sample test cases and we have done all necessary setup for Agent configuration (Active agent) and we able to start agent on CDC1.1 target.

But when we want to execute test cases from JT Harness, it is not able to run test cases on target. But target able to get request from JT Harness. It is showing on its console window.

JT harness showing error message: Error can’t find class “{0}”, used in “{1}”

Please help us to overcome this problem.

Thanks and regards,
Devndra

Message was edited by: devengupta

r_zelov
Offline
Joined: 2007-08-07
Points: 0

Hello Allen,

I created the same testsuite as in your post. I just commented the following line in .jtt :

#interview=com.openwave.ac2ts.AC2TSInterview

because I do not have your interview.

Then I do :
>> cd /rz/ac2ts
>> java -jar lib/javatest.jar

Then in JavaTest Harness window go to menu :

"File->Open Test Suite" and then select "/rz/ac2ts" directory and click "Open" button.

Test suite is opened and JavaTest test tree shows the following structure :

TestSuite Root
--Test1.java

All is OK. Maybe the problem is in interview. Could you please share sources of your
com.openwave.ac2ts.AC2TSInterview ?

Thanks,
Roma

acarito
Offline
Joined: 2007-09-26
Points: 0

Here is AC2TSInterview.java and i18n.properties:

==================================================================
AC2TSInterview.java
==================================================================
/*
* TODO - Ac2Interview
*/

package com.openwave.ac2ts;

import java.io.File;
import java.util.HashMap;
import java.util.Map;

import com.sun.interview.Checklist;
import com.sun.interview.ChoiceQuestion;
import com.sun.interview.ErrorQuestion;
import com.sun.interview.FileQuestion;
import com.sun.interview.FinalQuestion;
import com.sun.interview.IntQuestion;
import com.sun.interview.NullQuestion;
import com.sun.interview.Question;
import com.sun.interview.StringQuestion;

import com.sun.javatest.Parameters.EnvParameters;
import com.sun.javatest.TestEnvironment;
import com.sun.javatest.interview.BasicInterviewParameters;

public class AC2TSInterview
extends BasicInterviewParameters
implements EnvParameters
{
public AC2TSInterview() throws Fault {
super("AC2TS");
/* setHelpSet("moreInfo/ac2ts"); */
setResourceBundle("i18n");

String m = System.getProperty("interview.mode", "certify");
if (m.equals("certify"))
mode = CERTIFY;
else if (m.equals("developer"))
mode = DEVELOPER;
else if (m.equals("precompile"))
mode = PRECOMPILE;
}

public TestEnvironment getEnv() {
HashMap envProps = new HashMap();
export(envProps);
try {
String name = qName.getValue();
if (name == null || name.length() == 0)
name = "unknown";
return new TestEnvironment(name, envProps, "configuration interview");
}
catch (TestEnvironment.Fault e) {
throw new Error("should not happen");
}
}

public EnvParameters getEnvParameters() {
return this;
}

public Question getEnvFirstQuestion() {
switch (mode) {
case PRECOMPILE:
return qPrecompile;
case DEVELOPER:
return qDeveloper;
default:
return qName;
}
}

//----------------------------------------------------------------------
//
// Precompile mode

private Question qPrecompile = new NullQuestion(this, "precompile") {
public Question getNext() {
return qEnvEnd;
}

public void export(Map data) {
data.put("script.mode", "precompile");
data.put("command.compile.java", System.getProperty("command.compile.java"));
}
};

//----------------------------------------------------------------------
//
// Developer mode

private Question qDeveloper = new NullQuestion(this, "developer") {
public Question getNext() {
return qName;
}

public void export(Map data) {
data.put("script.mode", "developer");
data.put("command.compile.java", System.getProperty("command.compile.java"));
}
};

//----------------------------------------------------------------------
//
// Give a name for this configuration

private StringQuestion qName = new StringQuestion(this, "name") {
public Question getNext() {
if (value == null || value.length() == 0)
return null;
else
return qDesc;
}
};

//----------------------------------------------------------------------
//
// Give a description for this configuration

private Question qDesc = new StringQuestion(this, "desc") {
public Question getNext() {
if (value == null || value.length() == 0)
return null;
else
return qCmdType;
}

public void export(Map data) {
data.put("description", String.valueOf(value));
}
};

//----------------------------------------------------------------------
//
// How do you with to execute tests:
// OTHER_VM: on the same system as JT Harness, in separate process
// AGENT: on a different system, using JT Harness Agent

private static final String AGENT = "agent";
private static final String OTHER_VM = "otherVM";

private Question qCmdType = new ChoiceQuestion(this, "cmdType") {
{
setChoices(new String[] { null, OTHER_VM, AGENT }, true);
}

public Question getNext() {
if (value == null || value.length() == 0)
return null;
else if (value.equals(OTHER_VM))
return qJVM;
else
return qTestVerboseLevel;
}

public Checklist.Item[] getChecklistItems() {
if (value != AGENT)
return null;

return new Checklist.Item[] {
createChecklistItem("agent", "agent.needToStart"),
};
}

public void export(Map data) {
String cmd;
if (value != null && value.equals(OTHER_VM))
cmd = getOtherVMExecuteCommand();
else
cmd = "com.sun.javatest.agent.ActiveAgentCommand " +
"com.sun.javatest.lib.ExecStdTestSameJVMCmd " +
"$testExecuteClass $testExecuteArgs";
data.put("command.execute", cmd);
}
};

//----------------------------------------------------------------------
//
// What is the path for the JVM you wish to use to execute the tests?

private FileQuestion qJVM = new FileQuestion(this, "jvm") {
public Question getNext() {
if (value == null || value.getPath().length() == 0)
return null;
else if (! (value.exists() && value.isFile() && value.canRead()))
return qBadJVM;
else
return qTestVerboseLevel;
}
};

private Question qBadJVM = new ErrorQuestion(this, "badJVM") {
public Object[] getTextArgs() {
return new Object[] { qJVM.getValue().getPath() };
}
};

private String getOtherVMExecuteCommand() {
char fs = File.separatorChar;
char ps = File.pathSeparatorChar;

StringBuffer sb = new StringBuffer();
sb.append("com.sun.javatest.lib.ExecStdTestOtherJVMCmd ");
File jvm = qJVM.getValue();
sb.append(jvm == null ? "unknown_jvm" : jvm.getPath());
sb.append(" -classpath $testSuiteRootDir" + fs + "lib" + fs + "jtac2ts.jar" + ps
+ "$testSuiteRootDir" + fs + "lib" + fs + "javatest.jar ");
sb.append("$testExecuteClass $testExecuteArgs");
return sb.toString();
}

//----------------------------------------------------------------------
//
// What is the test verbose level?

private static final String LOW = "low";
private static final String MEDIUM = "medium";
private static final String HIGH = "high";

private Question qTestVerboseLevel = new ChoiceQuestion(this, "testVerboseLevel") {
{
setChoices(new String[] { null, LOW, MEDIUM, HIGH }, true);
}

public Question getNext() {
return qEnvEnd;
}

public void export(Map data) {
data.put("testVerboseLevel", String.valueOf(value));
}
};

//----------------------------------------------------------------------

private Question qEnvEnd = new NullQuestion(this, "envEnd") {
public Question getNext() {
return getEnvSuccessorQuestion();
}
};

//----------------------------------------------------------------------

private static final int PRECOMPILE = 1;
private static final int CERTIFY = 2;
private static final int DEVELOPER = 3;
private int mode;
}
==================================================================
i18n.properties
==================================================================
#
# TODO
#

title=AC2 Configuration Editor

agent=JT Harness Agent
agent.needToStart=You elected run tests using the JT Harness Agent. Make sure you have started a JT Harness Agent, in Active mode.

AC2TSInterview.badJVM.smry=*Invalid JVM
AC2TSInterview.badJVM.text=The path you specified does not identify a valid file:\n {0}

AC2TSInterview.cmdType.smry=How to Run Tests
AC2TSInterview.cmdType.text=Do you wish to run the tests on this computer (using a separate JVM), or to run them on another computer using a JT Harness Agent?
AC2TSInterview.cmdType.agent=Using a JT Harness Agent
AC2TSInterview.cmdType.otherVM=On this computer

AC2TSInterview.data.smry=Test Configuration Values...
AC2TSInterview.data.text=The following questions determine the local settings of some parameters required by some of the tests.

AC2TSInterview.desc.smry=Description
AC2TSInterview.desc.text=Please provide a short description to identify the configuration you are creating here.

AC2TSInterview.developer.smry=Developer Mode
AC2TSInterview.developer.text=Because of the setting of the system property `AC2TSInterview.mode'', the tests will be run in "developer" mode.

AC2TSInterview.envEnd.smry=Parameters...
AC2TSInterview.envEnd.text=The remaining questions ask about which tests in the test suite you want to run, and where you want to put the test results.

AC2TSInterview.epilog.smry=Completed!
AC2TSInterview.epilog.text=Congratulations!\n\nThis completes the configuration interview.\n\nClick the "check" button below to save your answers and dismiss the editor.

AC2TSInterview.jvm.smry=Java Virtual Machine
AC2TSInterview.jvm.text=Specify the path for the Java Virtual Machine you wish to use to execute the tests.

AC2TSInterview.name.smry=Configuration Name
AC2TSInterview.name.text=Please provide a short identifier to name the configuration you are creating here.

AC2TSInterview.precompile.smry=Precompile Mode
AC2TSInterview.precompile.text=Because of the setting of the system property `AC2TSInterview.mode'', the tests will be run in "precompile" mode.

AC2TSInterview.prolog.smry=Welcome!
AC2TSInterview.prolog.text=Welcome to the AC2 Configuration Editor!\n\nIn order for the JT Harness harness to execute the test suite, it requires information about how your computing environment is configured -- this editor interviews you to obtain that information.\n\nThe panel to the right contains information that should help you answer the interview questions.

AC2TSInterview.testVerboseLevel.smry=Test Verboseness
AC2TSInterview.testVerboseLevel.text=Specify how verbose tests should be.
AC2TSInterview.testVerboseLevel.low=Low
AC2TSInterview.testVerboseLevel.medium=Medium
AC2TSInterview.testVerboseLevel.high=High

r_zelov
Offline
Joined: 2007-08-07
Points: 0

I do not see any problems in interview. I compiled it and then opened test suite with AC2TSInterview. All is OK. JavaTest shows Test1.java in test tree.

--Roma

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

A few questions for context:

Do you see the proper test structure in the tree? You are using GUI mode? That is the first step to verifying that the harness can see your test suite correctly. With the root node selected, how many tests does the Summary tab show? Is this correct? If not, they the harness probably didn't read your test suite correctly. We should look at the config files you sent more carefully.

Since it is allowing you to run the tests, I will assume that it's not a major configuration problem.

I suggest changing the view filter to "Current Configuration" - use the drop-down on the upper left of the screen. I suspect that everything will turn grey. Click on the "Filtered Out" tab, read the right column to find out why they are filtered out (which means they will not be run when the Current Configuration view is selected).

Hopefully it will say something useful, like "Test does not match the keyword expression", which would mean that the keyword setting in your configuration is set to something which removes this test from possible execution.

Generally - my two guesses are:
1) your configuration settings result in a zero tests being eligible for execution
2) the harness was not able to properly identify the tests you created (it cannot see any of your tests)

Brian

acarito
Offline
Joined: 2007-09-26
Points: 0

> A few questions for context:
>
> Do you see the proper test structure in the tree?

No, I only see the words "Test Suite Root". I do not see a list of the one test as I did with demots.

> You are using GUI mode?

Yes, because I am still a beginner. Once I get the GUI working, I will play around with other ways to start tests.

> verifying that the harness can see your test suite
> correctly. With the root node selected, how many
> tests does the Summary tab show? Is this correct?

This is the crux of my problem. I am not seeing any tests.
The summary shows all "0" (zeroes).

> If not, they the harness probably didn't read your
> test suite correctly. We should look at the config
> files you sent more carefully.
>
> Since it is allowing you to run the tests,
> I will assume that it's not a major configuration problem.
>

I've not been able to run Test1. The only test suite that
I've successfully run in demots.

> I suggest changing the view filter to "Current
> Configuration" - use the drop-down on the upper left
> of the screen. I suspect that everything will turn
> grey. Click on the "Filtered Out" tab, read the
> right column to find out why they are filtered out
> (which means they will not be run when the Current
> Configuration view is selected).
>
> Hopefully it will say something useful, like "Test
> does not match the keyword expression", which would
> mean that the keyword setting in your configuration
> is set to something which removes this test from
> possible execution.
>
> Generally - my two guesses are:
> 1) your configuration settings result in a zero tests
> being eligible for execution
> 2) the harness was not able to properly identify the
> tests you created (it cannot see any of your tests)
>

I am favoring #2 because I am not seeing anything about Test1.java.

> Brian

Message was edited by: acarito

Message was edited by: acarito

acarito
Offline
Joined: 2007-09-26
Points: 0

Do I need a testsuite.html or some facsimile. In an effort to see if any tests can be found, I ran the following command and got what is shown below. I am not sure if I am using the command correctly, but I don't have a testsuite.html which left a little suspicious.

java -cp lib/javatest.jar com.sun.javatest.finder.ShowTests -nodes -finder com.sun.javatest.finder.TagTestFinder
Bad Arguments: testsuite.html file not specified
Usage:
java com.sun.javatest.finder.ShowTests [options] test-suite
Options:
-finder finderClass finderArgs... -end
specify the test finder to be used
-initial initial-file specify a starting point (optional)
-o output-file output file (default is standard output)
-nodes show nodes in the tree
-fulltests show contents of tests

Allen

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

No, testsuite.html is not required, but the tool kinda assumes that is what most people will have. You're not quite invoking the utility correctly - although using the GUI should tell you almost as much info as using ShowTests. ShowTests was really invented for use with more complex finders, like BinaryTestFinder.

Anyway, I think you command fails because the command is correctly formatted as:

java -cp lib/javatest.jar com.sun.javatest.finder.ShowTests -nodes -finder com.sun.javatest.finder.TagTestFinder -end tests/

Where "tests/" is the location where the top directory which contains your tests. Traditionally, this is a directory named tests/ as a directory inside your unpacked product. As seen in the demo.

So what does show up when you open your test suite in the GUI?

acarito
Offline
Joined: 2007-09-26
Points: 0

ok, got the testfinder command to work as shown below:

java -cp lib/javatest.jar com.sun.javatest.finder.ShowTests -finder com.sun.javatest.finder.TagTestFinder -end -fulltests tests/
Test1.java
executeClass com.openwave.ac2ts.tests.Test1
sources Test1.java

1. Is testsuite.html required for JT harness to run properly?

2. What should it contain?

3. Where should it be located?

Regarding your other question, here is more details regarding the GUI,

1. The command entered is as follows:
java -jar lib/javatest.jar -newDesktop

2. Two boxes are displayed. The bigger box in the background has the title "JT Harness: (not test suite or work directory selected)" and the smaller box has the title "JT Harness Quick Start".

3. I click "Start a new test run" and "next" in the small box. The small box, only, asks the question "Which test suite do you with to use?" with the default in the "/sandbox/ce/acarito/jtharness/ac2/ac2ts/". Again, I click "next".

4. The small box, only, changes asking for configuration information. I click "Create a new configuration" and "next".

5. The small box, only, changes asking for the work directory. I enter a work directory and click "next". I click "finish", to start the configuration editor.

6. I provide the following answers for the configuration editor:
a) Configuration Name = "ac2_config1"
b) Description = "ac2 config1 description"
c) How to Run Tests = "On this computer"
d) Java Virtual Machine = "/usr/bin/java"
e) Test Verboseness = "medium"
f) Specify Tests to Run? = "no"
g) Specify an Exclude List? = "no"
h) Specify Status? = "no"
i) Concurrency = "1"
j) Time Factor = "1"

7. Save configuration in a file and the small box goes away and the big box is the only thing remaining. It has the following:
a) Title = JT Harness: AC2 Test Suite (Tag Tests): /sandbox/ce/acarito/jtharness/ac2/ac2_work".
b) The "View Filter: Status of" is "All Tests".
c) The left panel contains "Test Suite Root". There is no directory tree like what I saw
running demots.
d) The right panel has the subtitle "Test Suite: AC2 Test Suite (Tag Tests)". The
Summary table is selected. The selected folder is 'Enter "AC2 Test Suite (Tag Tests)"
test suite'. The selected view filter is "All Tests, Unfilter view of the test suite and results
in the work directory". Pass = 0, Failed =0, Error = 0, Not Run = 0, Subtotal = 0,
Filter Out = 0, Total = 0. The bottom caption in that right panel reads "No tests in this
folder were selected for execution".
e) The line under both panels contains the following:
"Work Directory: ac2_work Configuration: ac2_config.jti Template: ac2_config.jti"
f) The next line has "Elapsed Time" of 00:00:00.
g) The last line has "AC2 Test Suite (Tag Tests)".

8. Clicking the "Start Running Tests" icon, produces the JT Harness Error "No tests
found or selected. Check your configuration settings."

Allen

r_zelov
Offline
Joined: 2007-08-07
Points: 0

testsuite.html is not required. It's necessary only for browsing of test descriptions without JavaTest harness.

--Roma