开发者

Looking for Info on a Javascript Testing framework

开发者 https://www.devze.com 2022-12-23 06:40 出处:网络
Hi Can somebody fill me in on JavaScript Testing Frameworks? I\'m working on a project now开发者_运维问答 and as the JS (Mostly jQuery) libraries grow, it\'s getting more and more difficult to intro

Hi Can somebody fill me in on JavaScript Testing Frameworks?

I'm working on a project now开发者_运维问答 and as the JS (Mostly jQuery) libraries grow, it's getting more and more difficult to introduce change or refactor, because I have no way of guaranteeing the accuracy of the code without manually testing everything.

I don't really know anything about JavaScript Testing Frameworks, or how they integrate/operate in a .Net project, so I thought I'd ask here.

What would a good testing framework be for .Net? What does a JavaScript test look like? (e.g. with NUnit, I have [TestFixture] classes & [Test] methods in a ProjectTests assembly) How do I run a javascript test? What are the conceptual differences between testing JS & testing C#? Is there anything else that would be worth knowing?

Thanks

Dave


As for jQuery testing(and Javascript testing in general) you should maybe take a look at QUint, jQuerys testing suite. You simply include a couple of javascript-files, and a css-stylesheet, write your testes in the same document(or if you want to include them of course), and open the document. The testing framework sets up the page, and lets you run the test.

As for implementation with C# and .Net I can't help you.


Already lot of questions (and replies) about this subject on stack overflow:

  • The most complete: What are some JavaScript Unit Testing and Mocking Frameworks you have used?
  • Looking for a better JavaScript unit test tool
  • Javascript Unit-testing?


You should at least be aware of jsUnit.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号