RTC Custom Precondition - Not able to access Junit View Part(eclipse api) in custom pre condition
![]()
Hi,
I am trying to write a rtc precondition that stops the developer from delivering the code to the server when there are any junit errors reported in the eclipse JUnit view.
To acheive this i tried using eclipse APIs, ViewPart(org.eclipse.ui.part.ViewPart) &TestRunnerViewPart(org.eclipse.jdt.internal.junit.ui).
The newly written precondition is listed as one of the preconditions by RTC but when the deliver option is done, this
precondition is not executed. Tried printing in the console but even the first line is not getting printed. But when i remove this reference to ViewPart of the eclipse API, then the plugin/precondition gets invoked during deliver action. Can any one give me a suggestion as to how to go about the issues.
|
One answer
![]()
Ralph Schoon (63.3k●3●36●46)
| answered Apr 09 '15, 5:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Apr 09 '15, 5:03 a.m.
If the plug in does not get picked up, there is almost always a problem with missing dependencies.
If the plugin works with an Eclipse development environment (see https://jazz.net/library/article/1000) but not in the production environment this is the typical issue. This kind of precondition would have to be deployed and run in the Eclipse client as well, since it refers to a client plugin. It might be worth to mention that there are related preconditions available already: ![]() Comments Thanks a lot for the quick response!.
I also explored the already available "Require Junit Test Run" pre condition, but is running Test suite, but the project we are working on is huge and has got loads of Test cases, so we prefer to validate only specific test files when the developer tries to deliver the source code to the server.Due to this reason we started building our own pre condition.
I will try to add few more eclipse UI dependencies to the plug-in and try on the server.
Mean while i have couple of questions,
1) would like to understand, whether the custom precondition should always refer to the same version of eclipse(dependency/APIs) that RTC is using for its existing precondition or can the precondition run on a different version.
will there be any problem due to mismatch in version?
2)Where can we see the error logs(dependency missing) on the RTC?
Thank,
Shanmugam
I don't know what your state of experience with extending. You can debug Client and Server extensions. See https://rsjazz.wordpress.com/2013/02/28/setting-up-rational-team-concert-for-api-development/
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.