DESCRIPTION

tmf: batch import wizard smoke test

This is a sample of how to make a test using SWTBOT.
It should be a useful stepping stone to gain test
case coverage and control what we're reading.

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

What would be nice to have:
* closing a trace
* all the other functional test on all the trace types!

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


COMMENTS

author: Ivy Mitchell
date: 2013-11-21 20:19:20.000000000

Uploaded patch set 28.

-------------------------------------
author: Brenden Conley
date: 2013-11-21 20:19:26.000000000

Patch Set 28:

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

-------------------------------------
author: Brenden Conley
date: 2013-11-21 21:03:14.000000000

Patch Set 28: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/4077/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-21 23:48:03.000000000

Patch Set 28: Code-Review-1

(9 comments)

Small comments.

Also, I would rename the package name to "tmf.ui.tests.swtbot" instead of "smoketest". You can keep the test files themselves SomethingSmokeTest.java, but we might eventually have SWTBot tests that are not just smoke tests. Also, "smoketest.conditions" should really be "swtbot.conditions".

It ran on Hudson, good, although locally all I manage to get is a window that turns grey and stays there forever. Maybe you can show me how to SWTBot, since I can't into it.

Line:19, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/conditions/TreeItemNodeAvailable.java -> You could add a short class Javadoc to explain what this class is, even if it's not public (this reminds me, I think we could enable this as a warning... hmm)

applies to the following classes too

Line:40, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/conditions/TreeItemNodeAvailable.java -> delete this comment

applies to the other classes too

Line:25, lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF -> what is this part for?

Line:67, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/conditions/ConditionHelpers.java -> ctrl+shuft+f

Line:23, lttng/org.eclipse.linuxtools.lttng.target/lttng-e4.3.target -> Those two lines are reversed compared to the other target def files.

I also can't seem to set the 4.3 target in my workspace, it gives me errors like
  Unable to locate installable unit org.eclipse.swtbot.feature.group

Seems related?

Line:113, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> you can use /* one line comment */ when they're short, saves space

Line:226, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> Is there a point fail()'ing in xxx@xxx.xxx (does that even work?)

Line:264, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> does this need to be public? Could it protected?

same for the two classes below

Line:520, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> That's a pretty big file! You could add
 //-------------
 // Delimiters like this
 //-------------

in places like here

-------------------------------------
author: Ivy Mitchell
date: 2013-11-22 19:06:05.000000000

Patch Set 28:

(4 comments)

Line:25, lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF -> BatchImportTraceWizard/
swtbot button/
swtbot conditions
swtbot in general

Line:185, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> rename

Line:226, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> Also used in init

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

-------------------------------------
author: Braxton Mccarthy
date: 2013-11-22 20:33:59.000000000

Patch Set 28:

(2 comments)

Line:25, lttng/org.eclipse.linuxtools.tmf.ui.tests/META-INF/MANIFEST.MF -> I mean the uses:=  line, we don't have that anywhere else. Why is it needed here? Was it added by the Manifest Editor UI?

Line:226, lttng/org.eclipse.linuxtools.tmf.ui.tests/src/org/eclipse/linuxtools/tmf/ui/tests/smoketest/ImportAndReadSmokeTest.java -> It's fine in init(), you fail the tests that are about to run. But in xxx@xxx.xxx if all the tests have passed, what's the point in failing here?

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