我可以以某种方式强制执行我的功能和方案或从specflow功能文件生成的Nunit测试中的执行顺序吗?如果我能首先测试所有输入功能的数据,而不是数据修改和数据删除功能,那将是很好的.
我正在使用git.
我正在分支机构,让它说它是分支机构A
.
当一些事情发生变化时master
,我通常想要采取这些改变,我正在通过改变分支来做到这一点A
.
问题是,我在分支上有50-60次提交A
,每次发生小变化时master
我都需要进行rebase并重新解决所有冲突.
如果有的话,我可以解决新的冲突会很好.
有没有办法在git中做到这一点?
我为我的朋友制作了C#应用程序,它连接到访问数据库(mdb文件).我已经在安装了win7 x86的计算机上开发了应用程序.我的朋友有XP,它工作得很好,但现在他安装了win7 x64并且应用程序不起作用.实际上,应用程序启动并且行为规则,但无法连接到数据库...数据库也可以通过访问打开,但我的应用程序无法连接到它.有什么问题?如何让我的应用程序在两个操作系统上运行?
问候,
Vajda
我有ExcelStepDefinition类,其中有我的excel测试步骤.我也有WordStepDefinition类.由于我有两个类相同的大量步骤,我创建了一些StepDefinition类,它将成为这两个类的基类.
在这个基类中,我需要在构造函数中有一些args,这取决于实例化的类(excel或word).我已经做了所有这些,但是当我在Nunit中开始测试时,它失败并跟随堆栈跟踪:
System.IndexOutOfRangeException : Index was outside the bounds of the array.
TearDown : System.IndexOutOfRangeException : Index was outside the bounds of the array.
at TechTalk.SpecFlow.ScenarioContext.GetBindingInstance(Type bindingType)
at TechTalk.SpecFlow.ScenarioContext.GetBindingInstance(Type bindingType)
at lambda_method(ExecutionScope )
at TechTalk.SpecFlow.Bindings.MethodBinding.InvokeAction(Object[] arguments, ITestTracer testTracer, TimeSpan& duration)
at TechTalk.SpecFlow.TestRunner.FireEvents(BindingEvent bindingEvent, IEnumerable`1 tags)
at TechTalk.SpecFlow.TestRunner.FireScenarioEvents(BindingEvent bindingEvent)
at TechTalk.SpecFlow.TestRunner.OnScenarioStart(ScenarioInfo scenarioInfo)
at ABZ.ExcelTest.DisplayValueOfLinkedItemUsingFormattingRulesDefinedForAGivenLanguageFeature.ScenarioSetup(ScenarioInfo scenarioInfo) in D:\Projects\VS2008\ABZ\ABZ Report Office\ABZ.ExcelTest\ExcelSwitchLanguage.feature.cs:line 0
at ABZ.ExcelTest.DisplayValueOfLinkedItemUsingFormattingRulesDefinedForAGivenLanguageFeature.DisplayFactValueWithFormattingDefinedInSelectedLanguage(String cell, String column, String label, String lang, String cellValue) in d:\Projects\VS2008\ABZ\ABZ Report Office\ABZ.ExcelTest\ExcelSwitchLanguage.feature:line 23
--TearDown
at TechTalk.SpecFlow.ScenarioContext.GetBindingInstance(Type bindingType)
at …
Run Code Online (Sandbox Code Playgroud) 我有这种情况:
我的ModelView:
public class Subject
{
public int ID { get; set; }
public string Name { get; set; }
public int ProfessorID { get; set; }
public string ProfessorFullName{ get; set; }
public IList<Assistant> Assistants { get; set; }
}
public class Assistant
{
public string AssistantFullName{ get; set; }
}
Run Code Online (Sandbox Code Playgroud)
我的查询:
var subjects = from subject in Entities.Subjects
from professor in subject.Lecturers
where professor.Professor == true
select new SSVN.ModelView.Subject()
{
ID = subject.ID,
Name= subject.Name,
ProfessorFullName= professor.LastName+ " …
Run Code Online (Sandbox Code Playgroud) 我有2张桌子.MarkQuestion和Question.
MarkQuestion has:
IDQuestion,
IDUser,
Mark
Question has:
IDQuestion,
Text
Run Code Online (Sandbox Code Playgroud)
我想提取每个问题的文本和每个问题的平均分数:
我试过这样的事情:
var questions = from mark in Entities.MarkedQuestions
join question in Entities.Questions on mark.IDQuestion equals question.IDQuestion
group mark by mark.IDQuestion into markGroup,
question by question.IDQuestion into questionGroup
select new ModelView.MarkQuestionModel
{
AverageMark = markGroup.Average(x => x.Mark),
Text = ..
};
Run Code Online (Sandbox Code Playgroud)
怎么解决这个?
我正在尝试将一些样式应用于我的工作簿中的单元格.我想在后台线程中执行此操作,以便我的GUI可以保持响应.这个工作应该花几秒钟,如果我点击我的文档中的一些随机单元格,我将得到一个例外.这是我的代码:
public void ApplyStyles()
{
BackgroundWorker bw = new BackgroundWorker();
bw.DoWork += DoWork;
bw.RunWorkerAsync();
}
private void DoWork(object sender, DoWorkEventArgs e)
{
try
{
foreach (ICell xcell in cells)
{
Microsoft.Office.Interop.Excel.Range cell = cellUtility.GetCell(xcell);
if (styles.ContainsKey(styleIds[xcell.Style]))
{
Style s = styles[xcell.Style];
cell.Style = s;
}
}
}
catch (Exception ex)
{
if (Logger.IsErrorEnabled)
{
Logger.Error(ex.ToString());
}
messageBox.ShowErrorMessage(localizationMessages.ApplyingErrorText, localizationMessages.ApplyingErrorCaption);
}
}
Run Code Online (Sandbox Code Playgroud)
当异常发生时,这是我收到的消息;
System.Runtime.InteropServices.COMException (0x800AC472): Exception from HRESULT: 0x800AC472
at System.RuntimeType.ForwardCallToInvokeMember(String memberName, BindingFlags flags, Object target, Int32[] aWrapperTypes, MessageData& msgData)
at Microsoft.Office.Interop.Excel.Range.set_Style(Object …
Run Code Online (Sandbox Code Playgroud) 我有这种情况:
[Given(@"I select cell (.+)")]
[When(@"I select cell (.+)")]
[Then(@"I select cell (.+)")]
public void WhenIClickOnExcelCellX(string cell)
{
excelDriver.SelectCell(cell);
}
Run Code Online (Sandbox Code Playgroud)
是否有任何通配符属性可以匹配这三个关键字中的任何一个?我想写这样的东西,不要担心我是否提供了该属性的映射.
[Any(@"I select cell (.+)")]
public void WhenIClickOnExcelCellX(string cell)
{
excelDriver.SelectCell(cell);
}
Run Code Online (Sandbox Code Playgroud) 当有一些连接问题(与服务器通信)时,我的应用程序中触发了一些事件,此功能应该为我的请求提供重试机制.现在我想测试一下.如果有一些C#库我可以在特定端口打开和关闭我的localhost连接,这将是最好的解决方案.有没有办法在.NET中执行此操作?
编辑:我正在与Jetty服务器通信,该服务器是在8080端口手动启动的.