Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rhapsody plugin testing

Tags:

I am developing a plugin for IBM Rational Rhapsody using this Java API.

This plugin is registered in the help file and is working fine as long as I can tell. In order to have more confidence about its stability I created a JUnit test suite that I can run through my IDE.

However that's just a mocking solution and I was wondering if there is any way to create an integration test suite that starts from Rhapsody.

What I would really like could be automate the execution of my plugin on a list of test models assessing its good behaviour

I can't find any reference to this on the internet so also other ideas are welcome.

like image 723
rakwaht Avatar asked Feb 16 '18 10:02

rakwaht


1 Answers

That's how I implemented the integration test suite:

What I did was to create a Rhapsody model containing N components. Then in Java using JUnit I implemented a base test case that given a model name it does start up a new Rhapsody application and opens it.

Once Rhapsody is open I can use Java APIs to select the correct component simulating a mouse click on its name and then I can run my plugin functions exactly like it was fired for a right click event on the element.

This approach is the only way I found to test my plugin programmatically so that I can use to detect regression. However this is not the perfect solution since it's quite slow (for example 10secs just to startup Rhapsody).

like image 196
rakwaht Avatar answered Sep 21 '22 13:09

rakwaht