试图远程运行selenium 2脚本(Trying to run selenium 2 scripts remotely)
我已启动并运行selenium 2 Web驱动程序脚本,现在我想将它们与我的持续集成过程联系起来。 我有两台用于运行selenium的物理机器和一台运行Hudson的构建机器的VM机器。
如何让Hudson在远程计算机上启动selenium脚本?
I have selenium 2 web driver scripts up and running and I now want to tie those into my continuous integration process. I have 2 physical machines set aside for selenium to run on and a VM machine for our build machine that also runs Hudson.
How do I have Hudson start selenium scripts on a remote machine?
原文:https://stackoverflow.com/questions/5420411
最满意答案
System.Data.Entity.Infrastructure.SqlConnectionFactory
不打算以这种方式使用。 这个连接工厂包含一个构造函数,它允许我们覆盖最终连接sting的部分,例如用户名,密码和服务器,而不是整个东西。
例如,我们可以像这样更改数据库服务器:Database.DefaultConnectionFactory = new SqlConnectionFactory("Server=MyDatabaseServer");
您可以通过在app.config中提供与 DbContext名称匹配的连接字符串来轻松完成此处尝试的操作 - 我假设它是PicturesCatalog :
<connectionStrings> <add name="PicturesCatalog" connectionString="data source=.; Initial Catalog=PicturesDatabase; Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
System.Data.Entity.Infrastructure.SqlConnectionFactory
is not meant to use in this way. This connection factory includes a constructor that allows us to override pieces of the final connection sting, such as username, password and server and not the whole thing.
For example, we can change the Database Server like this:Database.DefaultConnectionFactory = new SqlConnectionFactory("Server=MyDatabaseServer");
What you try to do here can be easily accomplished by providing a connection string in your app.config that matches the name of your DbContext - I assume it's PicturesCatalog:
<connectionStrings> <add name="PicturesCatalog" connectionString="data source=.; Initial Catalog=PicturesDatabase; Trusted_Connection=True;" providerName="System.Data.SqlClient" /> </connectionStrings>
相关问答
更多-
我忘记它是否默认启用,但尝试在Application_Start设置它(很确定它不是) System.Data.Entity.Database.DbDatabase.SetInitializer
(new CreateDatabaseIfNotExists ()); I forget if it's enabled by default but try setting this in your Application_Start (pretty ... -
你可以像这样执行数据库范围的sql语句 using(var context = new MyContext()) { // custum sql statement var c = context.Database.SqlQuery
("SELECT COUNT(*) FROM Employees"); // returned entity type doesn't have to be represented by ObjectSet/DBSet var e = ... -
你试过明确指定了StoreGeneratedPattern吗? modelBuilder.Entity
() .HasKey(p => p.Id) .Property(p => p.Id) .StoreGeneratedPattern = StoreGeneratedPattern.None; builder.Entity ().MapSingleType().ToTable("BOB"); Have you tried explicitl ... -
正如大家所提到的,你需要分析你的查询。 假设您使用的是SQL Server,那么您可以仅使用SQL Server Profiler并比较查询和执行计划。 与任何性能问题一样,您必须首先进行测量。 在你的情况下,你必须做更多。 你必须用每种技术测量两次,并确保你比较苹果和苹果。 如果您可以排除正在生成的sql,那么您将不得不测量应用程序代码,以便可能排除那里的瓶颈。 我怀疑这将是生成的查询。 As everyone has mentioned, you need to profile your queries ...
-
这是我在控制台应用程序中尝试过的,并按预期工作: namespace Q7122388 { #region Imports using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.Data.Entity; using System.Linq; #endregion public cla ...
-
首先,卸载2012.3并重新安装Update 2 CTP 2版本。 这将至少让你恢复正常运行。 接下来创建一个'test tfs'框,其中包含TFS数据库的备份和安装的2012.2 CTP 2,并尝试将其升级到2012.2并查看它是否有效 - 您仍然可以从MSDN订阅者下载中下载更新2。 如果这不起作用,我建议你直接给微软支持,看看他们是否可以帮助你。 Firstly, uninstall 2012.3 and reinstall your Update 2 CTP 2 version. That will ...
-
KeyAttribute只是.NET 4,它位于System.ComponentModel.DataAnnotations程序集中,因此请确保您已经引用它。 The KeyAttribute is .NET 4 only and it is located in the System.ComponentModel.DataAnnotations assembly so make sure you have referenced it.
-
System.Data.Entity.Infrastructure.SqlConnectionFactory不打算以这种方式使用。 这个连接工厂包含一个构造函数,它允许我们覆盖最终连接sting的部分,例如用户名,密码和服务器,而不是整个东西。 例如,我们可以像这样更改数据库服务器: Database.DefaultConnectionFactory = new SqlConnectionFactory("Server=MyDatabaseServer"); 您可以通过在app.con ...
-
难道你不能在枚举之前过滤列表吗? foreach (T item in children.Where(x => x.IsDeleted == false) { RenderLi(sb, item, liContent, itemContent); AppendChildren(sb, item, childrenProperty, liContent, itemContent); } I ended up rewriting my html helper, so i could filte ...
-
如果您查看EntityTypeConfiguration
类,您将看到以下签名用于定义一对多关系(这是您与BirthYears之间的关系): HasMany (Expression >> navigationPropertyExpression) where TTargetEntity : class; 如您所见,有一个约束where TTargetEntity ...