Uploaded image for project: 'Service Design and Creation'
  1. Service Design and Creation
  2. SDC-3297

Improve code and coverage Test Topology Auto Design- Service Import

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Medium Medium
    • Honolulu Release
    • None
    • SDC
    • None

      As reported during code review, code of Test Topology Auto Design- Service Import

      For the code of this review: https://gerrit.onap.org/r/c/sdc/+/112684

       

      Code coverage must be increased as well as maintainability,

      By maintainability, it means:

      1. Copy paste of existing methods must be replaced by common code. Resource/Service classes have a parent class Component. The code must use that class instead in the signature, no need to duplicate the code for that. All the existing code & tests have been unnecessarily duplicated.
      2. The methods having more than 30 lines must be split into smaller methods.
      3. The number of method parameters must be reduced
      4. Class with 6K lines of code must be split into smaller classes
      5. Sonar issues and ONAP checkstyle issues must be fixed.
      6. Test coverage must be improved, the last sonar test done on the code reported only 38% of coverage for that new code.

      We are going to merge the first part but on the basis that code is going to be improved at minimum to not break coverage metrics.

      Target sonar metric : line coverage to be above 55% as per release requirements

            zhaoxiangjun666 zhaoxiangjun666
            chrisc chrisc
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: