-
10 Mar 2010 2:03 AM #1
About 3.2 Béta Unit Testing
About 3.2 Béta Unit Testing
Hi,
I have downloaded extjs 3.2 beta today, the zip package contains a new folder named test, with a lots of unit test example. How to run them ? Because i didn't found anything related to Ext.test.session except in the units tests js files. Did I miss something ?
Thanks.
-
10 Mar 2010 7:11 AM #2
Unit Tests are based on YUI 2.6 YAHOO.tool.TestCase but still nothing about Ext.session.test
-
10 Mar 2010 2:57 PM #3
I'm also really interested in the new unit tests. I've been looking at writing unit tests for my ExtJS components for a while but lack the experience / examples.
ExtJS team: what do you use to run all the tests in multiple browsers? Do you have a post-commit hook on your git repository to trigger off these tests?
I've had a look at Testswarm (http://testswarm.com/) which looks like it could do the trick.
-
10 Mar 2010 3:55 PM #4Sencha - Community Support Team
- Join Date
- Jan 2009
- Location
- Palo Alto, California
- Posts
- 1,941
- Vote Rating
- 6
We've written a simple test harness which grabs all of the unit test files, downloads them to the client and runs them all. All of our unit tests are currently using YUI test but we have support for any testing framework (theoretically
).
For now you won't be able to run the framework-level tests yourself (unless you write your own test harness) as we're not currently ready to release our own harness files.
I'm a big fan of automated testing at both framework and application levels so we'll almost certainly release something to make this easier in an upcoming release. I'd like to get it right first time though instead of releasing what we have now and correcting it later.Ext JS Senior Software Architect
Personal Blog: http://edspencer.net
Twitter: http://twitter.com/edspencer
Github: http://github.com/edspencer
-
10 Mar 2010 6:28 PM #5
I can't wait to see what you guys come up with. I think with the right tools and framework we're likely to see a big shift in the ExtJS community towards automated testing. We currently unit test our server side code, but only do manual js code even though there are three times as much javascript code compared to the server side code.
With Automated Tests I can imagine a couple of different scenarios:
* JS scenarios that do not require any coupling to server side code. (just can check out js and run).
* Client Side code that interacts with server side code
A few options:
* Setup a server side test database, launch the webserver, run tests client side that test server side interaction
* Mock Store and Ajax interfaces so that no server side connection is needed.
-
12 Mar 2010 7:55 AM #6
please give some hints
please give some hints
>>> All of our unit tests are currently using YUI test
>>> unless you write your own test harness
Does that mean something like wrapping
intoCode:Ext.test.session.addTest( 'Ext', {.... suite.add(new Y.Test.Case({.....
please give some hints:Code:var oTestCase = new YAHOO.tool.TestCase({.... var TestRunner = YAHOO.tool.TestRunner; TestRunner.add(oTestCase); TestRunner.subscribe(TestRunner.TEST_FAIL_EVENT, handleTestResult); TestRunner.run();
for example what does the Y.Assert. mean?
Y stands for YUI doesn't it. ha (sherlock)
Do you use the adapters for that?
thanks simon
-
12 Mar 2010 9:05 AM #7
This isn't something that's part of Ext's YUI adapter, or YUI itself for that matter. It's an add-on framework Yahoo developed for others to write their own test conditions.
I would suggest you go to Yahoo's YUI developer forum. You will find articles/blog posts about how to setup tests. I have written 100s of test cases for some of my utility code in fairly short time. Note this isn't UI testing, e.g mouse interaction, click handling, but low level API stuff.Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
19 Mar 2010 4:07 AM #8
For those interested in unit-testing:
http://openjsan.org/go/?l=Test.Run
http://openjsan.org/src/s/sa/samurai...n-0.06/INSTALL


Reply With Quote