Adding new Metrics

LegacyForumLegacyForum Posts: 1,669 ✭✭
edited December 2016 in Jtest
Where should I add new metrics
Hi,
I do not quite understand how the mark up should be developed to add a new metric. Where should I save the implemented class? Could some one tell me how I should go about adding a new metric? Thank you

Comments

  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    Hello,

    Could you send more information on what you would like to do with metrics? Are you trying to create a rule similar to the available metrics rules? Or, do you want to enable metrics reporting in Jtest?

    Thanks
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    I want to know how to create a new metric rule like the metric rules available.
    I know how to enable the metrics and get the metrics report.
  • LegacyForumLegacyForum Posts: 1,669 ✭✭
    You can create simple metric type rules using RuleWizard.

    For example, to create a rule that checks if a method has more than 2 return statements do the following:
    1. Open RuleWizard (right-click in the standards tab of the Jtest configurations window)
    2. Create the method node:
      a. Select File > New b. Check By Node in Rule Creation c. Select Declarations > Method > Ok
    3. Now finish building the graphical representation of the rule (see the attachment)
    4. To complete the rule you will need to specify rule properties and save it to the jrules folder.

    For more information about rule nodes
    and creating user-defined rules in general, refer to the User's Guide in Jtest and the RuleWizard documentation (see Help).

    Please contact support through email if you need help creating a specific rule.
Sign In or Register to comment.