Get help with testing, discuss unit testing strategies etc.


Post by anunnaki »

Hallo,

I'd like to organize my test in testclasses.

So I created a testcript like this:
StartTest(function(t) {

    var loginTest = new TestLogin(t);
    loginTest.testLogin();
})
The test itself should be in the class TestLogin:
function TestLogin(t){

     this.testLogin=function(){

    }
}
If I do so, the test scipt doesn't find the class TestLogin. It is possible to announce the script to look for the class TestLogin in file TestLogin.js ?

Thank you for help.
anunnaki

Post by mats »

You can simply add it to the Harness preload array, or to the alsoPreload array of an individual test. Does that solve it?

Post Reply