DESCRIPTION

tmf: batch import wizard smoke test

This is a sample of how to make a test using SWTBOT.
It is not elegant, yet. It may be useful to gain
test case coverage.

The test features:
* a kernel trace generator
* importing a trace
* opening a trace
* navigation in a trace

What would be nice to have:
* closing a trace
* all the other unit traces!

Change-Id: I91e258ed5fb7735287da303d518314460839547b
Signed-off-by: Ivy Mitchell xxx@xxx.xxx


COMMENTS

author: Ivy Mitchell
date: 2013-10-08 19:23:18.000000000

Uploaded patch set 8.

-------------------------------------
author: Brenden Conley
date: 2013-10-08 19:23:24.000000000

Patch Set 8:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/3659/

-------------------------------------
author: Brenden Conley
date: 2013-10-08 19:41:21.000000000

Patch Set 8: Verified-1

Build Failed 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/3659/ : FAILURE

-------------------------------------
author: Braxton Mccarthy
date: 2013-10-08 20:01:38.000000000

Patch Set 8: Code-Review-1

(12 comments)

Line:10, /COMMIT_MSG -> It won't be merged until it's elegant :P

Line:76, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> that line. THAT line again....

Line:78, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> SmokeTest is not very descriptive, should be something like BatchImportSwtBotTest

Line:83, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> static volatile

Also, volatile is different if it's used for an object than if it's used for a primitive. What is the need here?

Line:84, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> Since it's a "real-world" test case, wouldn't it be better to use a real trace?

Line:88, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> Add a timeout rule, to make sure it doesn't hang Hudson. We should do this for all SWTBot tests, since it's relatively easy to make it hang...

Something like:

  /** Time-out after 30 seconds */
 xxx@xxx.xxx
  public TestRule globalTimeout= new Timeout(30000);

Or more time, depending on how the test should take. This can also be used for cases where the test *should* complete within a certain time, and taking too long would indicate failure.

Line:456, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> will this be kept? if not, remove it

Line:488, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> don't need javadoc for private methods

Line:497, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> idem

Line:563, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> idem

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/AllTmfUITests.java -> Do we want to put those in a separate package? If this is a test of the Batch Import, it should go in Batch Import tests.

Line:22, lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF -> Put those above the linuxtools.* dependencies.

Also, add the swtbot to the target definitions.

-------------------------------------
author: Ivy Mitchell
date: 2013-10-17 20:40:56.000000000

Patch Set 8:

(4 comments)

Line:10, /COMMIT_MSG -> Did I say elegant, I meant elephant!

Line:76, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/SmokeTest.java -> Done

Line:32, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/AllTmfUITests.java -> This should become a launchpad for swtbot tests more than a UNIT test for batch import.

Line:22, lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF -> Done

-------------------------------------
