Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Executing Junit test case created by GMF for Diagram
Executing Junit test case created by GMF for Diagram [message #25422] Tue, 22 August 2006 08:12 Go to next message
Eclipse UserFriend
Originally posted by: vikas.goyal.hp.com

Hi,

I am using GMF for creating graphical editor for CCXML. Using
genmodel when I say 'Generate all' it generates 'edit','editor' and
'tests' project.After this using gmfgen I am generating Diagram Code. I
was wondering how to test diagram project using Junit test cases. Please
suggest.


Thanks in Advance

Regards,
Vikas
Re: Executing Junit test case created by GMF for Diagram [message #25504 is a reply to message #25422] Tue, 22 August 2006 08:38 Go to previous messageGo to next message
Eclipse UserFriend
You can look at the GMF unit tests found in CVS @
/cvsroot/technology/org.eclipse.gmf/tests/

- Rich


On 8/22/06 8:12 AM, in article
c7a11ebec5f0f0fddd26862b205b5791$1@www.eclipse.org, "Vikas Goyal"
<vikas.goyal@hp.com> wrote:

> Hi,
>
> I am using GMF for creating graphical editor for CCXML. Using
> genmodel when I say 'Generate all' it generates 'edit','editor' and
> 'tests' project.After this using gmfgen I am generating Diagram Code. I
> was wondering how to test diagram project using Junit test cases. Please
> suggest.
>
>
> Thanks in Advance
>
> Regards,
> Vikas
>
Re: Executing Junit test case created by GMF for Diagram [message #30039 is a reply to message #25504] Fri, 25 August 2006 04:45 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vikas.goyal.hp.com

Hi Rich,

Thanks for your Help. Now I am able to write test case ,but as it is
not creating any node on the editor I am not sure whether it has
successfully tested or not. How can I know whether it has been tested
succesfully.

Thanks & Regards,
Vikas Goyal
Re: Executing Junit test case created by GMF for Diagram [message #30835 is a reply to message #30039] Fri, 25 August 2006 13:09 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: cmahoney.ca.ibm.com

Vikas,

I'm not exactly sure what you mean, but did you try running any of the
org.eclipse.gmf.tests.runtime.diagram.ui tests? It is possible to see nodes
being created on the diagram during the test. If it is too fast, just add
some Thread.sleep() calls to the test case temporarily.

Hope that helps.

- Cherie


"Vikas Goyal" <vikas.goyal@hp.com> wrote in message
news:6e2532d197cc1dd9bb132832668631ab$1@www.eclipse.org...
> Hi Rich,
>
> Thanks for your Help. Now I am able to write test case ,but as it is
> not creating any node on the editor I am not sure whether it has
> successfully tested or not. How can I know whether it has been tested
> succesfully.
>
> Thanks & Regards,
> Vikas Goyal
>
>
Re: Executing Junit test case created by GMF for Diagram [message #30870 is a reply to message #30039] Fri, 25 August 2006 13:46 Go to previous messageGo to next message
Eclipse UserFriend
Hi Vikas,

You can create nodes on diagrams as part of your unit tests (we do this in
ours), set properties, etc. If you launch the tests in UI mode, you can
watch this happen, or are you looking for testing that simulates user clicks
(e.g. Macro recording)?

Best,
Rich


On 8/25/06 4:45 AM, in article
6e2532d197cc1dd9bb132832668631ab$1@www.eclipse.org, "Vikas Goyal"
<vikas.goyal@hp.com> wrote:

> Hi Rich,
>
> Thanks for your Help. Now I am able to write test case ,but as it is
> not creating any node on the editor I am not sure whether it has
> successfully tested or not. How can I know whether it has been tested
> succesfully.
>
> Thanks & Regards,
> Vikas Goyal
>
>
Re: Executing Junit test case created by GMF for Diagram [message #31290 is a reply to message #30870] Mon, 28 August 2006 03:14 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: vikas.goyal.hp.com

Hi Rich,

Could you please explain "what is UI mode"? I tried running
"org.eclipse.gmf.tests.runtime.diagram.ui" as Junit test and eclipse
application but couldn't see node creation. Right now I am not looking for
testing that simulates user clicks.

Please advice how to run in UI mode?

Thanks & Regards,
Vikas
Re: Executing Junit test case created by GMF for Diagram [message #31426 is a reply to message #31290] Mon, 28 August 2006 05:38 Go to previous message
Eclipse UserFriend
Hi Vikas,

If you look at the test.xml file in each of our unit test projects, you'll
see a call to an ant target 'ui-test' which is an alternative to 'core-test'
which is used to run unit tests that don't require UI component testing.
You can look here for more on running our unit tests from the workbench:
http://wiki.eclipse.org/index.php/GMF_Development_Guidelines #Running_Tests_i
n_the_Workbench

AFAIU, the TPTP macro recorder for simulating user clicks does not work (or
does not work well) with GEF, which prevents it from being used on GMF. We
do not currently provide these kinds of tests.

Best,
Rich


On 8/28/06 3:14 AM, in article
04af1754a200fe8d002ffc7976b9fc41$1@www.eclipse.org, "Vikas Goyal"
<vikas.goyal@hp.com> wrote:

> Hi Rich,
>
> Could you please explain "what is UI mode"? I tried running
> "org.eclipse.gmf.tests.runtime.diagram.ui" as Junit test and eclipse
> application but couldn't see node creation. Right now I am not looking for
> testing that simulates user clicks.
>
> Please advice how to run in UI mode?
>
> Thanks & Regards,
> Vikas
>
>
Previous Topic:From uml to gmf
Next Topic:Help - dynamic properties
Goto Forum:
  


Current Time: Fri May 09 03:42:18 EDT 2025

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

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

Back to the top