问题标签 [build-server]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
.net - 是否有任何支持无头测试执行的 .NET Web 自动化框架?
类似于htmlunit,但用于 C#。我已经看到您可以通过IKVM将 htmlunit 与 .NET 一起使用,但如果可能的话,我想要一个本机解决方案。
目的是将 UI 测试添加到我们在 CI 服务器上运行的现有 (xUnit.net) 测试中。我希望能够在内存中运行 UI 测试(因为我不想在我无法控制的机器上打开浏览器实例),而不依赖于其他机器(如果我使用Selenium RC则需要, 例如)。
有谁知道实现这一目标的方法?
更新:Selenium 2现在提供 HtmlUnit 作为其支持的浏览器之一。任何想在不通过 IKVM 的情况下使用 HtmlUnit 的人都应该看看 Selenium 2。我在下面更新了我的答案以反映这一点。
tfs - 分支的 TFS 构建服务器构建?
我们有一个 TFS 2008 项目,它有两个分支(“Main”和“NewFeature”)。每个都是源代码的完整、独立的“副本”(变体)。
通过更改工作区映射,我们可以将任一变体映射到我们的本地 PC 上,并且可以毫无问题地使用这两个分支。
但是,如果我设置映射以将我们的构建服务器切换到 NewFeature 分支(就构建服务器而言,它应该简单地交换 NewFeature 源代码而不更改任何其他内容)我得到错误:
即,当它从 NewFeature 分支构建时,仍然在Main分支中查找某些内容,即使在源代码中的任何地方都没有对该分支的引用。它似乎正在缓存对 Main 的一些引用?!
我已经完成了一个完全干净的构建(从服务器中删除了构建文件夹并使用 /p:ForceGet=true 运行构建,以确保映射被刷新到服务器,并且服务器上没有可能缓存的文件工作区绑定),但这无济于事。
有什么建议么?
stored-procedures - 构建服务器和存储过程的方法
我负责为我们的办公室设置构建服务器。我们目前将所有查询放入 SQL 2000 服务器中的存储过程中。这是手动完成的,不会生成或放入 SVN 中的 SQL 文件。
我所追求的是一种处理构建服务器的好方法,该服务器可以从数据库中获取所有存储的过程。
我猜这可能是不可能的/实践,我很确定这不是最佳实践。我意识到一种解决方案可能是开始创建 SQL 脚本文件并将它们放入 SVN 中,以便可以拾取和处理它们。
continuous-integration - 与 .net 和 svn 的持续集成
我们目前没有在我们的项目中应用持续集成的自动化构建和测试。我们并没有为此烦恼,因为我们只有 2 名开发人员在开发它,但即使有 2 人的团队,我仍然认为使用持续集成并确认我们的构建不会中断或测试开始是有价值的失败。
我们将 .Net 与 C# 和 WPF 一起使用。我们创建了 Python 脚本来构建应用程序 - 使用 MSbuild - 并运行所有测试。我们的源代码在 SVN 中。
使用此设置应用持续集成的最佳方法是什么?我们应该得到什么工具?它应该是不需要大量设置的。简单的上手程序和很少的维护是必须的。
svn - SVN: Release branch and externals?
We have two websites for the same client (main www site and another for the ecommerce site which sits on a seperate server) that use shared portion of code (various features/styles/javascript etc.). We currently manage this by having the shared code as seperate projects (in the same repos) in SVN and using svn:externals to pull the branch of each of these into the two website projects.
We have just created two release branches, one each for the two sites. Everything gets commited to trunk for each of the sites as normal when working and when "ready for live" we merge it into the release branch for that site. Works a treat except today we modified the some of the shared code and noticed that the release branch pulled it in straight away when we did an update on the release branch. This is not what we wanted :(
So any ideas how we can iron out this problem. We used externals to DRY up the sharing of the code but is there another way? Notice that in this question (How can I branch in SVN and have it branch my svn:external folders as well?) they mention externals are bad and we should be using a different build process but no mention of what that should be.
We have CruiseControl.net running our builds and are keen to get this nut cracked. Has anyone any ideas on a better process?
Cheers
Pete
UPDATE: We've since moved to using Mercurial (Fogcreek's Kiln) for our source control. Mercurial also has the idea of sub-repos so we followed that route with our project there too. However it comes at a cost, branching is made really difficult as is tagging and simply keeping everything up to date. Our latest method is to bring both projects into one repos including all the shared repos too. This gives us one "mega project" which slows clone time (check out in SVN) but we do that so rarely that the gains of not having to deal with sub-repos makes it well worth while. We now use feature switching/toggling rather than branching which also simplifies our development greatly.
nunit - NUnit vs MSTest - 一个善变的 TDD 新手的经验
这里有很多关于 NUnit 与 MSTest 的问题,我已经阅读了其中不少。我认为我在这里的问题略有不同,可以单独发布。
当我开始使用 C# 时,我什至从未考虑过查看 MSTest,因为我以前使用 C++ 时已经习惯了没有它可用。我基本上忘记了这一切。:) 所以我从 NUnit 开始,并且喜欢它。测试很容易设置,测试也不是很痛苦——只需启动 IDE 并运行测试!
正如这里的许多人所指出的,NUnit 经常更新,而 MSTest 的更新频率与 IDE 一样。如果您不需要处于 TDD 的前沿(我不是),这不一定是个问题,但我经常更新的问题是让所有系统保持最新。我每天使用大约四五台不同的 PC,虽然更新它们并不是什么大不了的事,但我希望有一种方法可以让我的代码在具有旧版本 NUnit 的系统上正确编译。由于我的项目引用了 NUnit 安装文件夹,所以当我升级框架时,任何安装了旧框架的计算机将不再能够编译我的项目。我试图通过在 SVN 中创建一个只有 NUnit DLL 的通用文件夹来解决这个问题, 有没有办法解决这个问题? 这就是让我第一次停止使用的原因。
然后有一天我想起了 MSTest,并决定试一试。我喜欢它被集成到 IDE 中。CTRL-R,CTRL-A,所有测试运行。多么简单!但后来我发现 MSTest 中可用的测试类型非常有限。我不知道我真正需要多少,但我想我应该回到 NUnit,我做到了。
大约现在我开始必须调试单元测试,而我能弄清楚如何在 NUnit 中进行调试的唯一方法是将 NUnit 设置为启动应用程序,然后在我的测试中设置断点。然后在 NUnit GUI 中,我将运行测试以达到断点。这是一个完整的 PITA。然后我再次查看 MSTest GUI,发现我可以在此处单击 Debug,它会执行我的测试!哇!现在,这是让我重新支持 MSTest 的杀手级功能。
现在,我回来使用 MSTest。不幸的是,今天我开始考虑日常构建并在 Tinderbox 上进行了一些搜索,这是我之前听说过的唯一用于此类事情的工具。这让我对其他工具如 buildbot 和 TFS 大开眼界。所以这里的问题是,我认为 MSTest 可以保证将我锁定在 TFS 中,以进行自动化的日常构建、持续集成或任何流行语。我的公司无法承受仅限于 MS 的解决方案(VS 除外),因此我想研究其他选择。
我很高兴回到 NUnit。我对重写 100 多个单元测试并不感到兴奋,但事情就是这样。但是,我真的很想有人解释如何解决我的这两个问题,总结起来是:
- 如何设置 NUnit 和我的项目,这样我就不必在每个系统上不断升级它来构建我的项目?
- 如何更轻松地调试单元测试?我的方法很痛苦,因为我必须在 NUnit 和默认应用程序之间切换来测试/运行我的应用程序。我在 SO 上看到一篇帖子,在 codeplex 上提到了 NUnitIt,但我对此没有任何经验。
更新——我正在比较我的开发虚拟机中的东西,到目前为止,NUnitit 非常好。它很容易安装(一键),我只需将它指向我的 SVN 外部文件夹中的任何 NUnit 二进制文件。不错!我还进入了 VS -> 工具 -> 选项 -> 键盘,并将我的 CTRL-R、CTRL-A 映射更改为映射到 NUnitit.Connect.DebugGUI。不完美,因为我还没有弄清楚如何让 NUnit 在打开时自动运行测试,但它非常好。现在调试工作正常!
更新 #2——我安装了 TestDriven.Net 并快速运行。总的来说,我比 NUnitit 更喜欢它,但目前,NUnitit 获胜是因为它是免费的,而且由于它也可以与 NUnit 一起使用,它可以让我在时机成熟时“升级”到 TestDriven.Net。我最喜欢 TestDriven.Net 的一点是,当我双击失败的测试时,它会将我带到测试中失败的那一行,而 NUnit + NUnitit 似乎无法做到这一点。有没有人能够在 NUnit GUI 和 VS IDE 之间建立这种联系?
c# - MS Build Server 2010 - 缓冲区溢出 // 附加:如何从源安全中排除目录
我尝试在 MS Build Server(MS Visual Studio 2010 版本 10.0.30319.1)中构建关于 ServerTasks -> Builds -> Server Task Builder -> Queue new Built 的解决方案并运行,47 秒后我收到错误输出:
CSC:创建调试信息文件时出现意外错误 'c:\Builds\1\ServerTasks\Server-Tasks Builder\Sources\ThirdParty\Sources\samus-mongodb-csharp-2b8934f\MongoDB.Linq\obj\Debug\MongoDB.Linq.PDB ' -- 'c:\Builds\1\ServerTasks\Server-Tasks Builder\Sources\ThirdParty\Sources\samus-mongodb-csharp-2b8934f\MongoDB.Linq\obj\Debug\MongoDB.Linq.pdb:访问被拒绝
我检查了目录的权限并将其设置(仅用于调试目的)以授予所有用户访问权限,但仍然存在问题。运行 Procmon 并过滤目录的文件访问:
'c:\Builds\1\ServerTasks\Server-Tasks Builder\Sources\ThirdParty\Sources\samus-mongodb-csharp-2b8934f\MongoDB.Linq\obj\Debug\'
告诉我:
16:41:00,5449813 TFSBuildServiceHost.exe 3528 QuerySecurityFile C:\Builds\1\ServerTasks\Server-Tasks Builder\Sources\ThirdParty\Sources\samus-mongodb-csharp-2b8934f\MongoDB.Linq\obj\Debug BUFFER OVERFLOW 信息: DACL, 0x20000000
和
16:41:00,5462119 TFSBuildServiceHost.exe 3528 QueryOpen C:\Builds\1\ServerTasks\Server-Tasks Builder\Sources\ThirdParty\Sources\samus-mongodb-csharp-2b8934f\MongoDB.Linq\obj\Debug FAST IO DISALLOWED
有任何想法吗?
msbuild - Can I add an existing 2008 build server to new TFS 2010 server?
My scenario is this: I am currently testing out a new Team Foundation Server 2010 installation; which we will be moving to shortly.
Upgrading builds to work with TFS 2010 and the new MSBuild seems like a lot of work (it does not work out-of-the-box, at least). So what I would like to do, is to repurpose our old TFS Server to be a build server for TFS 2010. It already has build services installed.
I cannot figure out how to add an existing TFS 2008 Build Server to my new TFS 2010 installation, so I can use the old server to run old builds. Is this possible ? How can I do it ?
tfs - 无法启动 TFS 构建服务:错误 1227
当我尝试在端口 9191 上启动 TFS 2008 Build 服务时,我收到以下错误消息:
Windows 无法在本地计算机上启动 Visual Studio Team Foundation Build 服务。
错误 1227:网络传输端点已经有一个与之关联的地址。
如果我使用另一个端口它可以工作,但我需要它是默认的,9191。
我将不胜感激任何帮助!
更新:
我尝试删除以下命令显示的与端口 9191 的每个绑定:
要删除绑定,我使用了以下命令:
一旦我删除了绑定,服务就可以启动了,但是 BS Web 服务不能从外部使用,这是因为删除了绑定。我运行以下命令再次保留端点:
但是,该服务无法再次启动。显示与以前相同的错误消息。
TFSBuildService 的日志跟踪包含以下消息: