Pārlūkot izejas kodu

Update test result

sebavan 6 gadi atpakaļ
vecāks
revīzija
15f037c220

+ 6 - 0
Tools/Gulp/tasks/gulpTasks-whatsNew.js

@@ -27,6 +27,12 @@ gulp.task("tests-whatsnew", function(done) {
         }
     }
 
+    // Only on PR not once in.
+    if (process.env.BROWSER_STACK_USERNAME !== "$(babylon.browserStack.userName)") {
+        done();
+        return;
+    };
+
     // Compare what's new with the current one in the preview release folder.
     const https = require("https");
     const url = "https://rawgit.com/BabylonJS/Babylon.js/master/dist/preview%20release/what's%20new.md";

+ 12 - 0
Viewer/tests/karma.conf.js

@@ -34,6 +34,18 @@ module.exports = function (config) {
         // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
         logLevel: config.LOG_INFO,
 
+        reporters: ['progress', 'junit'],
+
+        junitReporter: {
+            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+            outputFile: 'ViewerUnitTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+            suite: 'Viewer Unit Tests', // suite will become the package name attribute in xml testsuite element
+            useBrowserName: false, // add browser name to report and classes names
+            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+            properties: {} // key value pair of properties to add to the <properties> section of the report
+        },
+
         browsers: ['ChromeHeadless']
     })
 }

+ 12 - 0
Viewer/tests/validation/karma.conf.js

@@ -34,6 +34,18 @@ module.exports = function (config) {
         // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
         logLevel: config.LOG_INFO,
 
+        reporters: ['progress', 'junit'],
+
+        junitReporter: {
+            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+            outputFile: 'ViewerValidationTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+            suite: 'Viewer Validation Tests', // suite will become the package name attribute in xml testsuite element
+            useBrowserName: false, // add browser name to report and classes names
+            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+            properties: {} // key value pair of properties to add to the <properties> section of the report
+        },
+
         browsers: ['Chrome']
 
     });

+ 21 - 1
azure-pipelines.yml

@@ -99,6 +99,11 @@ jobs:
       gulp tests-validation-virtualscreen
     workingDirectory: Tools/Gulp
     displayName: 'Visual Tests'
+  - task: PublishTestResults@2
+    condition: succeededOrFailed()
+    inputs:
+      testRunner: JUnit
+      testResultsFiles: '.temp/testResults/ValidationTests.xml'
   - script: 'gulp tests-validation-browserstack'
     workingDirectory: Tools/Gulp
     displayName: 'Browser Stack Tests'
@@ -130,6 +135,11 @@ jobs:
   - script: 'gulp tests-es6Modules'
     workingDirectory: Tools/Gulp
     displayName: 'Tests ES6'
+  - task: PublishTestResults@2
+    condition: succeededOrFailed()
+    inputs:
+      testRunner: JUnit
+      testResultsFiles: '.temp/testResults/ModuleTests.xml'
 
 - job: ViewerTests
   displayName: '7. Viewer Tests'
@@ -148,10 +158,20 @@ jobs:
   - script: 'gulp tests-viewer-unit'
     workingDirectory: Tools/Gulp
     displayName: 'Unit Tests'
+  - task: PublishTestResults@2
+    condition: succeededOrFailed()
+    inputs:
+      testRunner: JUnit
+      testResultsFiles: '.temp/testResults/ViewerUnitTests.xml'
   - script: |
       export DISPLAY=:99
       Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
       sleep 3 # give xvfb some time to start
       gulp tests-viewer-validation-virtualscreen
     workingDirectory: Tools/Gulp
-    displayName: 'Visual Tests'
+    displayName: 'Visual Tests'
+  - task: PublishTestResults@2
+    condition: succeededOrFailed()
+    inputs:
+      testRunner: JUnit
+      testResultsFiles: '.temp/testResults/ViewerValidationTests.xml'

+ 12 - 0
tests/modules/karma.conf.js

@@ -34,6 +34,18 @@ module.exports = function (config) {
         // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
         logLevel: config.LOG_INFO,
 
+        reporters: ['progress', 'junit'],
+
+        junitReporter: {
+            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+            outputFile: 'ModuleTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+            suite: 'Module Tests', // suite will become the package name attribute in xml testsuite element
+            useBrowserName: false, // add browser name to report and classes names
+            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+            properties: {} // key value pair of properties to add to the <properties> section of the report
+        },
+
         browsers: ['ChromeHeadless']
     })
 }

+ 12 - 0
tests/validation/karma.conf.js

@@ -42,6 +42,18 @@ module.exports = function (config) {
         // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
         logLevel: config.LOG_INFO,
 
+        reporters: ['progress', 'junit'],
+
+        junitReporter: {
+            outputDir: '.temp/testResults', // results will be saved as $outputDir/$browserName.xml
+            outputFile: 'ValidationTests.xml', // if included, results will be saved as $outputDir/$browserName/$outputFile
+            suite: 'Validation Tests', // suite will become the package name attribute in xml testsuite element
+            useBrowserName: false, // add browser name to report and classes names
+            nameFormatter: undefined, // function (browser, result) to customize the name attribute in xml testcase element
+            classNameFormatter: undefined, // function (browser, result) to customize the classname attribute in xml testcase element
+            properties: {} // key value pair of properties to add to the <properties> section of the report
+        },
+
         browsers: ['Chrome']
 
     });