Browse Source

Update validation test

David Catuhe 7 years ago
parent
commit
a1a58942a3
2 changed files with 21 additions and 18 deletions
  1. 6 3
      tests/validation/config.json
  2. 15 15
      tests/validation/integration.js

+ 6 - 3
tests/validation/config.json

@@ -241,7 +241,8 @@
       "renderCount": 20,
       "scriptToRun": "/Demos/GLTF1CesiumMan/index.js",
       "functionToCall": "createScene",
-      "referenceImage": "gltf1CesiumMan.png"
+      "referenceImage": "gltf1CesiumMan.png",
+      "excludeFromAutomaticTesting": true
     },
     {
       "title": "GLTF Mesh Primitive Attribute Test",
@@ -330,7 +331,8 @@
       "scriptToRun": "/Demos/Procedural/proceduralTexture.js",
       "functionToCall": "CreateProceduralTextureTestScene",
       "referenceImage": "procedural.png",
-      "replace": "./land, https://cdn.rawgit.com/BabylonJS/Website/06ecbea7/Demos/Procedural/land"
+      "replace": "./land, https://cdn.rawgit.com/BabylonJS/Website/06ecbea7/Demos/Procedural/land",
+      "excludeFromAutomaticTesting": true
     },
     {
       "title": "Instances",
@@ -338,7 +340,8 @@
       "scriptToRun": "/Demos/Instances/instances.js",
       "functionToCall": "CreateInstancesTestScene",
       "referenceImage": "instances.png",
-      "replace": "ground., Ground."
+      "replace": "ground., Ground.",
+      "excludeFromAutomaticTesting": true
     },
     {
       "title": "Instanced Bones",

+ 15 - 15
tests/validation/integration.js

@@ -1,4 +1,4 @@
-window.__karma__.loaded = function() {};
+window.__karma__.loaded = function () { };
 
 // Loading tests
 var xhr = new XMLHttpRequest();
@@ -10,38 +10,38 @@ xhr.addEventListener("load", function () {
 
         config = JSON.parse(xhr.responseText);
 
-        describe("Validation Tests", function() {
+        describe("Validation Tests", function () {
             before(function (done) {
                 this.timeout(180000);
                 require = null;
                 BABYLONDEVTOOLS.Loader
-                .require('/tests/validation/validation.js')
-                .useDist()
-                .load(function() {
-                    done();            
-                });
+                    .require('/tests/validation/validation.js')
+                    .useDist()
+                    .load(function () {
+                        done();
+                    });
             });
-        
+
             // Run tests
             for (let index = 0; index < config.tests.length; index++) {
                 var test = config.tests[index];
-                if (test.onlyVisual) {
+                if (test.onlyVisual || test.excludeFromAutomaticTesting) {
                     continue;
                 }
 
-                it(test.title, function(done) {
+                it(test.title, function (done) {
                     this.timeout(240000);
-        
+
                     try {
-                        runTest(index, function(result) {
+                        runTest(index, function (result) {
                             try {
-                                expect(result).to.be.true; 
+                                expect(result).to.be.true;
                                 done();
                             }
                             catch (e) {
                                 done(e);
                             }
-                        });                
+                        });
                     }
                     catch (e) {
                         done(e);
@@ -50,7 +50,7 @@ xhr.addEventListener("load", function () {
             };
         });
 
-        window.__karma__.start();          
+        window.__karma__.start();
     }
 }, false);