user1365697
user1365697

Reputation: 5999

Qunit is it possible to run tests automatically?

I created several tests in Qunit. Is it possible to run the test automatically ?

Upvotes: 0

Views: 424

Answers (1)

Abdul
Abdul

Reputation: 90

I think you can try this way

<script type="text/javascript">
    var tests = [
        { page: "Page01.htm", title: "Test Page 01 - click me to view test page" },
        { page: "Page02.htm" },
        { page: "Page01.htm" }
    ];
    var seq = true; // false to run tests simultaneously
    var runerDne = function(failures, total) {
        // get notified when runner completes
    }
    QUnit.run(tests, seq, runerDne);

This loads 3 pages automatically and executes accordingly. Hope this helps you.

Upvotes: 1

Related Questions