Add task to convert coverage.sjon to coverage.xml 67/56467/1
authorthuva4 <tharma.thuva@gmail.com>
Wed, 25 Apr 2018 09:49:36 +0000 (15:19 +0530)
committerthuva4 <tharma.thuva@gmail.com>
Wed, 25 Apr 2018 09:49:36 +0000 (15:19 +0530)
Change-Id: Icc3e175c23d399e33a8406c5aa18d79603d0314b
Signed-off-by: thuva4 <tharma.thuva@gmail.com>
testapi/opnfv_testapi/ui/Gruntfile.js
testapi/opnfv_testapi/ui/package.json

index 805ad9f..ab59475 100644 (file)
@@ -6,7 +6,22 @@ module.exports = function (grunt) {
     grunt.loadNpmTasks('grunt-wait');
     grunt.loadNpmTasks('grunt-contrib-copy');
     grunt.loadNpmTasks('grunt-contrib-connect');
+    grunt.loadNpmTasks('grunt-convert');
     grunt.initConfig({
+        convert: {
+            options: {
+              explicitArray: false,
+            },
+            json2xml: {
+                options: {
+                    xml: {
+                      header: true
+                    }
+                  },
+              src: ['../tests/UI/coverage/coverage.json'],
+                  dest: '../tests/UI/coverage/coverage.xml'
+            }
+        },
         connect: {
             server: {
                 options: {
@@ -159,6 +174,7 @@ module.exports = function (grunt) {
         'wait:default',
         'protractor_coverage',
         'makeReport',
+        'convert',
         'shell:deleteFiles'
     ]);
 }
index dc99239..2d4eb6e 100644 (file)
@@ -3,6 +3,7 @@
     "grunt": "~1.0.1",
     "grunt-contrib-connect": "^1.0.2",
     "grunt-contrib-copy": "^1.0.0",
+    "grunt-convert": "^0.1.12",
     "grunt-karma": "~2.0.0",
     "grunt-protractor-coverage": "^0.2.18",
     "grunt-protractor-runner": "~5.0.0",