Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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.

0 votes



One answer

Permanent link
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:


0 votes

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/
You should have run the workshop mentioned above and in that post.

You fail to provide information if this is a client or server extension. Errors are in the Eclipse log in the workspace (in .metadata) or in the CCM log on the server.

The extension should refer to a version equal or earlier than available in the target. The API is very stable, so If it works with an earlier verion of the SDK, it usually works with later versions as well.


Your answer

Register or log in to post 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 10,938

Question asked: Apr 09 '15, 3:12 a.m.

Question was seen: 3,793 times

Last updated: Apr 09 '15, 5:47 a.m.

Confirmation Cancel Confirm