I've been exploring different strategies for running integration tests within some Nant build scripts. Typically a number of different scripts are chained in one monolithic build that has separate targets: staging (build a staging version, like build), build (just build the stuff), integration (build the stuff and run the integration tests). This works reasonably well, the build target takes about a third of the time to run as the integration target and it's not painfully long so I don't find myself disinclined to run it frequently.
我一直在探索在一些Nant构建脚本中运行集成测试的不同策略。通常,许多不同的脚本链接在一个单独的构建中,该构建具有单独的目标:分段(构建分段版本,如构建),构建(只构建东西),集成(构建东西和运行集成测试)。这种方法运行得相当好,构建目标大约需要三分之一的时间来作为集成目标运行,并且它并不痛苦,所以我不觉得自己不愿意经常运行它。
The integration target on the other hand takes long enough that I don't want to do it very often - ideally just before I'm ready to do a deploy. Does this seem like a reasonable strategy? IOW, am I doing it right?
另一方面,集成目标需要足够长的时间,我不想经常这样做 - 理想情况是在我准备好部署之前。这看起来像是一个合理的策略吗?我,我做得对吗?
The plan is to eventually move this project to Continuous Integration. I'm new to the whole Continuous Integration thing but I think I understand the concept of "breaking the build" so I'm wondering what are some good practices to pick up in order to make the most of it?
该计划最终将该项目转移到持续集成。我是整个持续集成的新手,但我认为我理解“打破构建”的概念,所以我想知道为了充分利用它,需要采取哪些好的做法?
Any good sources of reading on this subject would be appreciated as well. Thanks!
任何有关这一主题的良好阅读资料也将受到赞赏。谢谢!
3 个解决方案
#1
3
Yes, you are on the right track. What you need to do now is to hook up your nant target to an automated process. I recommend using either Team City or Cruise Control for as your CI tool. Once you have your automated server setup you can run your build and unit tests on each check in (Continuous Integration). Your integration tests could then run at night or over the weekend since they typically take longer to run. If your integration tests are successful, you can then have a job that will deploy to some QA or other server.
是的,你走在正确的轨道上。您现在需要做的是将您的nant目标连接到自动化流程。我建议使用Team City或Cruise Control作为CI工具。完成自动服务器设置后,您可以在每次签入时运行构建和单元测试(持续集成)。然后,您的集成测试可以在晚上或周末运行,因为它们通常需要更长的时间才能运行。如果集成测试成功,那么您可以拥有一个将部署到某个QA或其他服务器的作业。
#2
2
Sounds like you're 99% of the way there. My advice is to just dive in and start doing it. You'll learn a lot more by actually taking the plunge and doing it than by thinking about whether you're doing it right.
听起来像你在那里99%的方式。我的建议是潜入并开始这样做。通过实际考虑并做到这一点,你会学到更多东西,而不是考虑你是否做得对。
My company is currently using CruiseControl and I personally think it's great.
我的公司目前正在使用CruiseControl,我个人认为这很棒。
#3
1
See this related thread What is a good CI build process?
查看此相关主题什么是良好的CI构建过程?
You are on the right track. If you're using a decent CI tool, you should be able to set each setup up as a separate project that triggers the next step in the chain... i.e. sucessfull build triggers tests which trigger deployment which triggers integration etc
你走在正确的轨道上。如果你正在使用一个不错的CI工具,你应该能够将每个设置设置为一个单独的项目,触发链中的下一步...即成功构建触发测试,触发部署,触发集成等
This way your ealiest "break" stops the line so to speak.
这样,你最简单的“休息”可以说停止线。
We use CruiseControl to build, unit-test, configure and deploy, run integration tests and code coverage, run acceptance tests, and package for release. This is with a system of 8 or so web services, and a dozen or so databases, all with interralated configuration and deployment dependencies with across multiple environments with different configurations (anythin from single boxes to redundent boxes for each component)
我们使用CruiseControl构建,单元测试,配置和部署,运行集成测试和代码覆盖,运行验收测试以及发布包。这是一个包含大约8个Web服务和十几个数据库的系统,所有这些数据库都具有相互配置的配置和部署依赖关系,跨越多个具有不同配置的环境(从每个组件的单个框到redundent框)
#1
3
Yes, you are on the right track. What you need to do now is to hook up your nant target to an automated process. I recommend using either Team City or Cruise Control for as your CI tool. Once you have your automated server setup you can run your build and unit tests on each check in (Continuous Integration). Your integration tests could then run at night or over the weekend since they typically take longer to run. If your integration tests are successful, you can then have a job that will deploy to some QA or other server.
是的,你走在正确的轨道上。您现在需要做的是将您的nant目标连接到自动化流程。我建议使用Team City或Cruise Control作为CI工具。完成自动服务器设置后,您可以在每次签入时运行构建和单元测试(持续集成)。然后,您的集成测试可以在晚上或周末运行,因为它们通常需要更长的时间才能运行。如果集成测试成功,那么您可以拥有一个将部署到某个QA或其他服务器的作业。
#2
2
Sounds like you're 99% of the way there. My advice is to just dive in and start doing it. You'll learn a lot more by actually taking the plunge and doing it than by thinking about whether you're doing it right.
听起来像你在那里99%的方式。我的建议是潜入并开始这样做。通过实际考虑并做到这一点,你会学到更多东西,而不是考虑你是否做得对。
My company is currently using CruiseControl and I personally think it's great.
我的公司目前正在使用CruiseControl,我个人认为这很棒。
#3
1
See this related thread What is a good CI build process?
查看此相关主题什么是良好的CI构建过程?
You are on the right track. If you're using a decent CI tool, you should be able to set each setup up as a separate project that triggers the next step in the chain... i.e. sucessfull build triggers tests which trigger deployment which triggers integration etc
你走在正确的轨道上。如果你正在使用一个不错的CI工具,你应该能够将每个设置设置为一个单独的项目,触发链中的下一步...即成功构建触发测试,触发部署,触发集成等
This way your ealiest "break" stops the line so to speak.
这样,你最简单的“休息”可以说停止线。
We use CruiseControl to build, unit-test, configure and deploy, run integration tests and code coverage, run acceptance tests, and package for release. This is with a system of 8 or so web services, and a dozen or so databases, all with interralated configuration and deployment dependencies with across multiple environments with different configurations (anythin from single boxes to redundent boxes for each component)
我们使用CruiseControl构建,单元测试,配置和部署,运行集成测试和代码覆盖,运行验收测试以及发布包。这是一个包含大约8个Web服务和十几个数据库的系统,所有这些数据库都具有相互配置的配置和部署依赖关系,跨越多个具有不同配置的环境(从每个组件的单个框到redundent框)