Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 320193 - [Dawn] Provide a flexible testing environment for UI tests
Summary: [Dawn] Provide a flexible testing environment for UI tests
Status: ASSIGNED
Alias: None
Product: EMF
Classification: Modeling
Component: cdo.dawn (show other bugs)
Version: 4.13   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Martin Fluegge CLA
QA Contact: Eike Stepper CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-18 12:08 EDT by Martin Fluegge CLA
Modified: 2020-12-11 10:41 EST (History)
1 user (show)

See Also:


Attachments
Patch v1 (103.00 KB, patch)
2010-08-02 16:52 EDT, Martin Fluegge CLA
no flags Details | Diff
Patch V2 (12.38 KB, patch)
2010-08-11 14:12 EDT, Martin Fluegge CLA
no flags Details | Diff
Patch v3 (136.14 KB, patch)
2010-08-16 15:07 EDT, Martin Fluegge CLA
no flags Details | Diff
Patch v4 (74.70 KB, patch)
2010-08-27 03:55 EDT, Martin Fluegge CLA
no flags Details | Diff
Patch v5 (84.79 KB, patch)
2010-12-20 11:19 EST, Martin Fluegge CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Fluegge CLA 2010-07-18 12:08:46 EDT
To guarantee the stability of Dawn and to be able to write bug related tests we need to provide a small testing environment for UI specific Dawn tests. 

There are some frameworks out there which could with support this (see http://wiki.eclipse.org/Automated_Testing). Though, first tests with SWTBot (http://www.eclipse.org/swtbot/) were quite promising I should also have a look at TPTP (http://www.eclipse.org/tptp/) and it's GUI Recorder (http://www.eclipse.org/tptp/test/documents/userguides/Intro-Auto-GUI.html).
Comment 1 Martin Fluegge CLA 2010-08-02 16:52:54 EDT
Created attachment 175733 [details]
Patch v1

I attached the first steps of the Dawn UI testing framework. 
It seems that SWTBot is quite nice for UI testing, although it has the major drawback that it cannot test to simultaneously started runtime instances. Until this is solved (or I have figured out how this can be done) we need to mock this with a separate session.  

In the next step I am going to lift this small test environment up to the CDO test to provide a base for CDO UI tests.
Comment 2 Martin Fluegge CLA 2010-08-02 16:55:48 EDT
Patch commit to HEAD. I also added Vik to the cc list. He might be interest in this bugzilla here ;)
Comment 3 Victor Roldan Betancort CLA 2010-08-03 06:11:26 EDT
Martin,

thanks for pinging me, this is of my interest :D I think I should give priority to the creation of tests for UI, as UI gets easily broken and we only realize when we start playing with it. As soon as I finish my DB4OStore, I'll get into this. 

Thanks!
Comment 4 Martin Fluegge CLA 2010-08-11 14:12:39 EDT
Created attachment 176384 [details]
Patch V2

Hi guys,

I moved the stuff up to the CDO testing environment. To demonstrate it I wrote a small test case which tests the CDOSessionView (I needed to add a small line to it because SWTBot identifies toolBar buttons by its tooltip). Just run it as SWTBotTest and enjoy.

The keyboard handling is sometimes a bit tricky. But maybe I am still missing something

Next I am going to find out how SWTBot test can be stated headless. 

If nothing speaks against it, I would like to commit this patch that other can start writing UI tests for CDO ;)
Comment 5 Eike Stepper CLA 2010-08-12 03:38:27 EDT
Two things speak against it :P

1) The test bundle manifest has a warning with your patch.
2) We don't want UI dependencies in the core test bundle.

Why don't you create a new test bundle?
Comment 6 Martin Fluegge CLA 2010-08-12 03:53:52 EDT
> 1) The test bundle manifest has a warning with your patch.

Argh. Seems that I've overseen the warnings again. I'll check whether I have the same and fix them.


> 2) We don't want UI dependencies in the core test bundle.
> Why don't you create a new test bundle?

First, I though about providing a new plug-in. I didn't do that because of the bugzillas package. If we have a bugzilla that has UI and core related problems the tests would be spread over different bundles, which could be elusive. 

If you think this is a minor drawback compared to the UI-dependency in the common test bundle, I'll change this ;)
Comment 7 Martin Fluegge CLA 2010-08-15 16:26:26 EDT
I created a new plug-in (org.eclipse.emf.cdo.test.ui) which serves as the root for our UI-based tests and as root for all UI-specific Dawn tests. All our test cases should inherit *AbstractCDOUITest*. Because SWTBot relies heavily on JUnit4 all UI test must be a combination of annotation triggered test and our basic test. This makes is quite easy for us to integrate both test frameworks (ours and SWTBot). Otherwise integration would be more complicated since Java does not support multiple inheritance ;)

For an example how new tests should look like, see *CDOSessionsViewTest*.
Comment 8 Martin Fluegge CLA 2010-08-16 15:07:17 EDT
Created attachment 176714 [details]
Patch v3

I attached another bunch of test cases. They are testing the basic behavior of the Acore diagram and the storage in CDO. This seems to work fine. 

I also wrote a test that checks the GMF Fragment generator for correctness, so changes in the reference editor can easily aligned with the generation template. 

In the next step I will focus an collaboration tests?
Comment 9 Martin Fluegge CLA 2010-08-16 15:10:34 EDT
Patch v3 committed to HEAD (after I checked for Warning ;))
Comment 10 Martin Fluegge CLA 2010-08-27 03:55:23 EDT
Created attachment 177591 [details]
Patch v4

Here comes another bundle of test cases. It now includes remote tests (multiple users) and tests for conflict detection. The test utilities have also been improved to make writing tests easier and clearer.
Comment 11 Martin Fluegge CLA 2010-08-27 04:01:38 EDT
Patch v4 committed to HEAD.
Comment 12 Martin Fluegge CLA 2010-09-30 02:45:16 EDT
I added additional test cases to verify the new emf editor fragments. This includes the beginning of an SWTBot which handles generated EMF editor. This makes testing the new behavior much easier. 

EMF tests and DawnSETBotEMFEditor...
Committed to HEAD
Comment 13 Martin Fluegge CLA 2010-12-20 11:19:01 EST
Created attachment 185559 [details]
Patch v5

I changed the test environment that it support now the execution of UI tests as ConfigTests. This means that we can now run our UI tests on different scenarios. 

I think this was an important step for integrating the UI tests into our headless test execution, which will be one of next steps.
Comment 14 Martin Fluegge CLA 2010-12-20 11:21:35 EST
Patch v5 committed to HEAD.
Comment 15 Eike Stepper CLA 2011-06-23 04:30:19 EDT
Moving all open enhancement requests to 4.1
Comment 16 Eike Stepper CLA 2012-08-14 22:49:38 EDT
Moving all open issues to 4.2. Open bugs can be ported to 4.1 maintenance after they've been fixed in master.
Comment 17 Eike Stepper CLA 2013-06-27 04:04:47 EDT
Moving all outstanding enhancements to 4.3
Comment 18 Eike Stepper CLA 2014-08-19 09:21:26 EDT
Moving all open enhancement requests to 4.4
Comment 19 Eike Stepper CLA 2014-08-19 09:34:23 EDT
Moving all open enhancement requests to 4.4
Comment 20 Eike Stepper CLA 2015-07-14 02:06:20 EDT
Moving all open bugzillas to 4.5.
Comment 21 Eike Stepper CLA 2016-07-31 00:49:09 EDT
Moving all unaddressed bugzillas to 4.6.
Comment 22 Eike Stepper CLA 2017-12-28 01:15:21 EST
Moving all open bugs to 4.7
Comment 23 Eike Stepper CLA 2019-11-08 02:13:58 EST
Moving all unresolved issues to version 4.8-
Comment 24 Eike Stepper CLA 2019-12-13 12:47:33 EST
Moving all unresolved issues to version 4.9
Comment 25 Eike Stepper CLA 2020-12-11 10:41:45 EST
Moving to 4.13.