简体   繁体   English

.Net和Javascript与单元测试的持续集成

[英]Continuous Integration For .Net and Javascript with Unit tests

I need a Continuous integration tool that will support both .Net Unit tests and Javascript unit tests and perform the builds. 我需要一个持续集成工具,该工具将支持.Net单元测试和Javascript单元测试并执行构建。

It looks like my main options are CruiseControl.NET using JUnit and NUnit or Team City and JS Test Driver. 看来我的主要选择是使用JUnit和NUnit的CruiseControl.NET或Team City和JS测试驱动程序。

Are there any other options and which ones have you used or had good or bad experiences with. 还有其他选择吗?您曾经使用过哪些选项,或有过好坏的经历?

thanks 谢谢

+1 for CC.Net here. 此处为CC.Net +1。 I use a combination of CC.Net and NUnit & Selenium for UI testing. 我将CC.Net和NUnit& Selenium结合使用进行UI测试。 CC.Net allows you to do everything you require and it's a doddle to setup. CC.Net允许您执行所需的所有操作,这是轻而易举的设置。

You can write custom modules to allow you to do things such as incremenet build numbers and modify config files on the build server. 您可以编写自定义模块,以允许您执行诸如incremenet内部版本号之类的事情,并在构建服务器上修改配置文件。

You can happily use a combination of unit tests and Selenium to test the UI using a test such as the following: 您可以愉快地使用单元测试和Selenium的组合来使用如下测试来测试UI:

[TestFixture]
public class UITest
{
    private ISelenium selenium;
    private StringBuilder verificationErrors;

    [SetUp]
    public void SetupTest()
    {
        selenium = new DefaultSelenium("server", 4444, "*iexplore", "http://server/");
        selenium.Start();
        verificationErrors = new StringBuilder();
    }

    [Test]
    public void TheUITest()
    {
        selenium.Open("/RecipeProfessor2/");
        selenium.Click("btnTest");
        selenium.Click("Button1");
        selenium.Click("ctl00_ctl06_toolBar_Home_Solve");
        selenium.Click("ctl00_ContentPlaceHolder1_chkIsLive");
        selenium.WaitForPageToLoad("30000");
        // etc
    }

}

You can obviously add in as many tests you require for either standard unit tests or UI tests. 显然,您可以添加标准单元测试或UI测试所需的尽可能多的测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM