Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [graphiti-dev] SWTBot Tests best practices

Thanks for clarifying the origins of bot.tests.

After some more testing, I found out, that I can live with ((GraphicalEditPart) editPart.part()).getModel() to get the Shape. Having the shape (actually it is the container shape), both GraphicalAlgorithm (via the corresponding child shape) as well as the associated domain object are reachable without too much coding.  

I also used add features directly when in the real UI I would have used DnD from navigator to the editor.

So the framework can remain unchanged.

Joerg


Date: Wed, 7 Sep 2011 14:46:03 +0200
From: "Wenz, Michael" <michael.wenz@xxxxxxx>
To: Discuss development topics on Graphiti <graphiti-dev@xxxxxxxxxxx>
Subject: Re: [graphiti-dev] SWTBot Tests best practices
Message-ID:
	<1E7289B36533AA4791F30795352AFB600B09D07025@xxxxxxxxxxxxxxxxxxxxxxxx>
Content-Type: text/plain; charset="iso-8859-1"

Hi,

the name bot.tests is maybe a little misleading. In fact the plugin contains all our tests that depend upon a running Eclipse  or plugin infrastructure. Maybe that should be separated more clearly...

True UI tests would indeed be real black box tests, on the other hand some things can be triggered more reliably using features and contexts and in most cases it is mostly relevant for us that the achieved effect on the screen is correct. Some of the tests are also rather old and steam from another UI testing framework we used to work with (Lift).

Regarding accessing the GA from GFAbstractShape: so far we only had the need for that in the tests, so we didn't move that to the framework. Do you see the need to do so?

Regards,
Michael


From: graphiti-dev-bounces@xxxxxxxxxxx [mailto:graphiti-dev-bounces@xxxxxxxxxxx] On Behalf Of J?rg Reichert
Sent: Mittwoch, 7. September 2011 11:16
To: graphiti-dev@xxxxxxxxxxx
Subject: [graphiti-dev] SWTBot Tests best practices

Hi,

I am currently writting some SWT Bot tests and therefore also took a look at the tests provided by org.eclipse.graphiti.bot.tests.
I was surprised, that in most cases the features and contexts (e.g. add feature, add context) were created and used. I would expect UI tests to be black box tests, so using only the visible UI features for creating diagram elements.

http://code.google.com/a/eclipselabs.org/p/spray/source/browse/tests/org.xspray.examples.one.tests/src/org/xspray/examples/one/tests/SimpleUITest.java

I also wonder, why GFAbstractShape does not provide public access to the GraphicsAlgorithm. Is ((GraphicalEditPart) editPart.part()).getModel() the only recommended way to get the Graphiti objects from the found GEF figures?

Regards,
Joerg

begin:vcard
fn;quoted-printable:J=C3=B6rg Reichert
n;quoted-printable:Reichert;J=C3=B6rg
org:itemis
adr:;;Ludwig-Erhardt-Str. 51;Leipzig;Sachsen;04103;Deutschland
email;internet:joerg.reichert@xxxxxxxxx
title:itemis, Niederlassung Leipzig
tel;work:+49-(0)341 / 231-0183-408
tel;fax:+49-(0)341 / 231-0183-411
tel;cell:+49-(0)151 / 173 96 690
note;quoted-printable:J=C3=B6rg Reichert=0D=0A=
	IT-Berater=0D=0A=
	=0D=0A=
	Telefon: +49 (0) 341 / 231 0183-403=0D=0A=
	Telefax: +49 (0) 341 / 231 0183-411=0D=0A=
	Mobil: +49 (0) 151 / 173 96-690=0D=0A=
	=0D=0A=
	http://www.itemis.de=0D=0A=
	=0D=0A=
	joerg.reichert@xxxxxxxxx=0D=0A=
	=0D=0A=
	https://www.xing.com/profile/Joerg_Reichert8=0D=0A=
	=0D=0A=
	itemis AG=0D=0A=
	Niederlassung Leipzig=0D=0A=
	Ludwig-Erhard-Stra=C3=9Fe 51=0D=0A=
	04103 Leipzig=0D=0A=
	=0D=0A=
	itemis AG=0D=0A=
	Hauptsitz=0D=0A=
	Am Brambusch 15-24=0D=0A=
	44536 L=C3=BCnen=0D=0A=
	=0D=0A=
	Rechtlicher Hinweis:=0D=0A=
	=0D=0A=
	Amtsgericht Dortmund, HRB 20621=0D=0A=
	=0D=0A=
	Vorstand: Jens Wagener (Vors.), Wolfgang Neuhaus, Dr. Georg Pietrek, Jens=
	 Trompeter, Sebastian Neus=0D=0A=
	Aufsichtsrat: Dr. Burkhard Igel (Vors.), Stephan Grollmann, Michael Neuha=
	us
url:http://www.itemis.de/
version:2.1
end:vcard

Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top