Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » TestRunner not finding test suites in project(Test suites are not being detected within an RCPTT test project.)
TestRunner not finding test suites in project [message #1782267] Wed, 21 February 2018 06:14 Go to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
I have created a number of projects within an RCPTT directory. Inside a project I have a test suite that I uses to run a set of tests. When the TestRunner scans my project structure, it doesn't pick up any test suites and reports there are no tests to be run. If I add a test to this project, TestRunner finds this and will execute my AUT just using that test. The documentation indicates that I can use a suites parameter, but this still doesn't find anything. Here is a copy of the command line file used to start TestRunner:
echo off
SET AUT=C:\Calypso
SET RUNNER=c:\apps\TestRunner\eclipse
SET PROJECT=C:\DEVROOT\calypso\client\trunk\RCPPT2
SET RESULTS=%PROJECT%\..\results
IF NOT EXIST %RESULTS% GOTO NORESULTS
RMDIR /S /Q %RESULTS%
:NORESULTS
md %RESULTS%

java -jar %RUNNER%/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar ^
 -application org.eclipse.rcptt.runner.headless ^
 -data %RESULTS%/runner-workspace/ ^
 -aut %AUT% ^
 -autArgs -serverAddress;localhost:65000;-data;P:/calypso_uitests/ ^
 -import %PROJECT%\AutoTest1;"%PROJECT%\Test Common" ^
 -suites StaffProfileTests.suite ^
 -autWsPrefix %RESULTS%/aut-workspace ^
 -autConsolePrefix %RESULTS%/aut-output ^
 -htmlReport %RESULTS%/report.html ^
 -junitReport %RESULTS%/report.xml

AutoTest1 is the project the contains the suite that I want to run, Test Common is a project that holds procedure libraries.

Does anyone know how to use test suites properly in the TestRunner?Thanks in advance.

[Updated on: Wed, 21 February 2018 22:57]

Report message to a moderator

Re: TestRunner not finding test suites in project [message #1782284 is a reply to message #1782267] Wed, 21 February 2018 10:10 Go to previous messageGo to next message
Ulyana Skorokhodova is currently offline Ulyana SkorokhodovaFriend
Messages: 280
Registered: July 2014
Senior Member
Hi Bruce,

Could you please try to define a suite name with an extension, like StaffProfileTests.suite ?

Kind regards,
Ulyana.
Re: TestRunner not finding test suites in project [message #1782325 is a reply to message #1782284] Wed, 21 February 2018 22:55 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Ulyana, thanks for the quick response. I added the .suite extension to the -suites argument (and moved it up - see the original text). This made no difference. The log contains the following:
progress: Reading plug-ins
Target platform is valid.
Looking for tests...
Existing projects in workspace:
    <none>
Importing projects to workspace:
Refreshing projects:
    C:\DEVROOT\calypso\client\trunk\RCPPT2\AutoTest1... OK
    C:\DEVROOT\calypso\client\trunk\RCPPT2\Test Common... OK
Refreshing projects:
    AutoTest1... OK
    Test Common... OK
Searching for tests in projects:
    AutoTest1...
No tests found
    Test Common...
No tests found
No tests to run.
Finished at Thu Feb 22 08:50:15 AEST 2018


Note: My project AutoTest1 contains only one test suite, namely StaffProfileTest.suite

If I add a single test to the AutoTest1 project and run the script with the -suites parameter, I still get no test found. If I remove the -suites parameter, the single test is picked up and run. The log looks like this:

progress: Reading plug-ins
Target platform is valid.
Looking for tests...
Existing projects in workspace:
    <none>
Importing projects to workspace:
Refreshing projects:
    C:\DEVROOT\calypso\client\trunk\RCPPT2\AutoTest1... OK
    C:\DEVROOT\calypso\client\trunk\RCPPT2\Test Common... OK
Refreshing projects:
    AutoTest1... OK
    Test Common... OK
Searching for tests in projects:
    AutoTest1...
Complete OK
    Test Common...
No tests found
Testcase Artifacts:1
AUT-0:Launching
AUT-0:Product: calypso.product
AUT-0:Application: calypso.application
AUT-0:Architecture: x86
32bit arch is selected because AUT uses Equinox launcher
        - C:plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813\
C:\DEVROOT\calypso\client\trunk\RCPPT2\..\results/aut-workspace0: AUT arguments: -serverAddress localhost:65000 -data P:/calypso_uitests/ -os ${target.os} -arch ${target.arch} -con
soleLog
C:\DEVROOT\calypso\client\trunk\RCPPT2\..\results/aut-workspace0: AUT VM arguments: -Xms64m -Djava.library.path=C:\Progra~1\IBM\Lotus\Notes;C:\Progra~1\Lotus\Notes;C:\Progra~2\IBM\
Lotus\Notes;C:\Progra~2\Lotus\Notes; -DLOTUS_NOTES_HOME=C:\Progra~1\IBM\Lotus\Notes -DLOTUS_NOTES_HOME2=C:\Progra~1\Lotus\Notes -DLOTUS_NOTES_HOME3=C:\Progra~2\IBM\Lotus\Notes -DLO
TUS_NOTES_HOME4=C:\Progra~2\Lotus\Notes -Dorg.eclipse.swt.browser.DefaultType=ie -Dorg.eclipse.swt.browser.IEVersion=9999 -XX:+HeapDumpOnOutOfMemoryError -Dawt.useSystemAAFontSetti
ngs=on -Dswing.aatext=true -Djava.net.preferIPv4Stack=true -Xmx512m -XX:MaxPermSize=128m
Pass 1 (1) processed. 0 failed. spent: 0:03, 0:00 mins remaining. Test1. time: 2900ms
Process terminated. Shut down AUTs
Finished at Thu Feb 22 09:22:21 AEST 2018

[Updated on: Wed, 21 February 2018 23:23]

Report message to a moderator

Re: TestRunner not finding test suites in project [message #1782620 is a reply to message #1782325] Tue, 27 February 2018 08:15 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Bruce,

Where are tests from 'StaffProfileTest' test suite located? Are they placed in the 'AutoTest1' project?
It is strange that RCPTT finds a single test case and doesn't find other cases...
Re: TestRunner not finding test suites in project [message #1782695 is a reply to message #1782620] Wed, 28 February 2018 00:48 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Both the test and the suite are in the AutoTest1 directory, these are the files:

AutoTest1
|
 -- 
    .project
    rcptt.properties
    runner.cmd
    StaffProfileTests.sute
    Test1.test

I open a cmd window and run the tests from that directory using the runner.cmd file (see at the top) without test parameters or "-tests Test1.test", the result is:

Target platform is valid.
Looking for tests...
Existing projects in workspace:
    <none>
Importing projects to workspace:
Refreshing projects:
    C:\DEVROOT\calypso\client\trunk\RCPPT2\AutoTest1... OK
    C:\DEVROOT\calypso\client\trunk\RCPPT2\Test Common... OK
Refreshing projects:
    AutoTest1... OK
    Test Common... OK
Searching for tests in projects:
    AutoTest1...
Complete OK
    Test Common...
No tests found
Testcase Artifacts:1
AUT-0:Launching
AUT-0:Product: calypso.product
AUT-0:Application: calypso.application
AUT-0:Architecture: x86
32bit arch is selected because AUT uses Equinox launcher
        - C:plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813\
C:\DEVROOT\calypso\client\trunk\RCPPT2\..\results/aut-workspace0: AUT arguments: -serverAddress localhost:65000 -data P:/calypso_uitests/ -os ${target.os} -arch ${target.arch} -consoleLog
C:\DEVROOT\calypso\client\trunk\RCPPT2\..\results/aut-workspace0: AUT VM arguments: -Xms64m -Djava.library.path=C:\Progra~1\IBM\Lotus\Notes;C:\Progra~1\Lotus\Notes;C:\Progra~2\IBM\Lotus\Notes;C:\Progr
a~2\Lotus\Notes; -DLOTUS_NOTES_HOME=C:\Progra~1\IBM\Lotus\Notes -DLOTUS_NOTES_HOME2=C:\Progra~1\Lotus\Notes -DLOTUS_NOTES_HOME3=C:\Progra~2\IBM\Lotus\Notes -DLOTUS_NOTES_HOME4=C:\Progra~2\Lotus\Notes
-Dorg.eclipse.swt.browser.DefaultType=ie -Dorg.eclipse.swt.browser.IEVersion=9999 -XX:+HeapDumpOnOutOfMemoryError -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Djava.net.preferIPv4Stack=true -
Xmx512m -XX:MaxPermSize=128m
Pass 1 (1) processed. 0 failed. spent: 0:03, 0:00 mins remaining. Test1. time: 2942ms
Process terminated. Shut down AUTs
Finished at Wed Feb 28 10:28:56 AEST 2018


Note: Only 1 test artifact is found (this is Test1 based on the output). The result is as expected.

Using "-suites StaffProfileTests.suite" in the command file doesn't work. It produces this result:

Target platform is valid.
Looking for tests...
Existing projects in workspace:
    <none>
Importing projects to workspace:
Refreshing projects:
    C:\DEVROOT\calypso\client\trunk\RCPPT2\AutoTest1... OK
    C:\DEVROOT\calypso\client\trunk\RCPPT2\Test Common... OK
Refreshing projects:
    AutoTest1... OK
    Test Common... OK
Searching for tests in projects:
    AutoTest1...
No tests found
    Test Common...
No tests found
No tests to run.
Finished at Wed Feb 28 10:41:55 AEST 2018

[Updated on: Thu, 01 March 2018 03:56]

Report message to a moderator

Re: TestRunner not finding test suites in project [message #1782845 is a reply to message #1782695] Fri, 02 March 2018 12:17 Go to previous messageGo to next message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
You should not delete tests after adding them into a test suite. The test suite just contains names of test case should be executed, it doesn't contain content of the test cases
Re: TestRunner not finding test suites in project [message #1782913 is a reply to message #1782845] Mon, 05 March 2018 02:10 Go to previous messageGo to next message
Bruce Edgerton is currently offline Bruce EdgertonFriend
Messages: 25
Registered: May 2017
Junior Member
Thanks Viktoria, your answer made me realise that I wasn't including the project that contained the actual tests I'm trying to run. So, I made the following changes to the command file:

echo off
SET AUT=C:\Calypso
SET RUNNER=c:\apps\TestRunner\eclipse
SET PROJECT=C:\DEVROOT\calypso\client\trunk\RCPPT2

REM Path to directory with test results, default is C:\Users\User\results
SET RESULTS=%PROJECT%\..\results

REM Remove results dir if present
IF NOT EXIST %RESULTS% GOTO NORESULTS
RMDIR /S /Q %RESULTS%

:NORESULTS
md %RESULTS%

java -jar %RUNNER%/plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar ^
 -application org.eclipse.rcptt.runner.headless ^
 -data %RESULTS%/runner-workspace/ ^
 -aut %AUT% ^
 -suites FullStaffProfileTests.suite ^
 -autArgs -serverAddress;localhost:65000;-data;P:/calypso_uitests/ ^
 -import "%PROJECT%\Test Common";%PROJECT%\CalypsoUITests ^
 -autWsPrefix %RESULTS%/aut-workspace ^
 -autConsolePrefix %RESULTS%/aut-output ^
 -htmlReport %RESULTS%/report.html ^
 -junitReport %RESULTS%/report.xml

Unfortunately, I'm now getting this error which is stopping the tests from running:
Target platform is valid.
Looking for tests...
Existing projects in workspace:
    <none>
Importing projects to workspace:
Refreshing projects:
    C:\DEVROOT\calypso\client\trunk\RCPPT2\Test Common... OK
    C:\DEVROOT\calypso\client\trunk\RCPPT2\CalypsoUITests... OK
Refreshing projects:
    CalypsoUITests... OK
    Test Common... OK
Searching for tests in projects:
    CalypsoUITests...
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.eclipse.emf.ecore.xmi.impl.XMLHandler (file:/C:/apps/TestRunner/eclipse/plugins/org.eclipse.emf.ecore.xmi_2.13.0.v20170503-0428.jar) to method com.sun.org.apa
che.xerces.internal.parsers.AbstractSAXParser$LocatorProxy.getEncoding()
WARNING: Please consider reporting this to the maintainers of org.eclipse.emf.ecore.xmi.impl.XMLHandler
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
No tests found
    Test Common...
No tests found
No tests to run.
Finished at Mon Mar 05 11:57:02 AEST 2018
Re: TestRunner not finding test suites in project [message #1783332 is a reply to message #1782913] Mon, 12 March 2018 07:09 Go to previous message
Viktoria Dlugopolskaya is currently offline Viktoria DlugopolskayaFriend
Messages: 124
Registered: March 2017
Senior Member
Hi Bruce,

This is just a warning, not an error, it should not stop a test execution.

Check 'Extra projects' section in the doc: https://www.eclipse.org/rcptt/documentation/userguide/maven/
And a similar topic on the forum:
https://www.eclipse.org/forums/index.php/t/1069450/

[Updated on: Tue, 13 March 2018 08:24]

Report message to a moderator

Previous Topic:Where can I find the log of TeslaCore.log?
Next Topic:Some text fields cannot be filled when replaying
Goto Forum:
  


Current Time: Tue Apr 23 17:17:48 GMT 2024

Powered by FUDForum. Page generated in 0.03722 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top