Opened 15 years ago
Last modified 15 years ago
#4242 closed New Feature
Enable running single test — at Initial Version
Reported by: | Garry Yao | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | CKEditor 3.1 |
Component: | QA | Version: | |
Keywords: | Confirmed HasTest | Cc: |
Description
In unit testing, previously we've been used the following trick a lot to force executing only one specific test:
// Run one specific test without registering to YUI runner. window.onload = testCase.testName;
Now when adapting to our new testing system CKTester( #4218 ), the old approach doesn't work at all, so this ticket is intended to figure out a better way for achieving the same goal without change CKTester.
One official way ( from YUI Test functionality ) is to use the following declaration on a test case:
var oTestCase = new YAHOO.tool.TestCase({ _should: { ignore: { testName: true //ignore this test } } });
But this is inconvenient when we want to ignore all tests but one, so I'm suggesting of extending YUI Test to support a more simpler syntax:
_should: { ignoreAllBut: { testName: true //ignore all tests except this, comment this line to toggle it. } }
Test case written in this manner should be more easier to understand and modify.