I created a Specflow project which has one feature file, EBIntegrationTest.feature :
Feature: EBIntegrationTest for MF
Initial test feature
@mytag
Scenario: Subscribe to Market Data EU Topic and write to SQL DB
Given MD messages are streaming to MF application
When MF enriches template 304
Then the enriched messages are then written to an SQL DB server
I then added a step file to my Steps folder:
using System;
using System.Collections.Generic;
using System.Text;
namespace eb_test_tool.Steps
{
class EBIntegrationTest
{
[Given(@"MD messages are streaming to MF application")]
public void GivenMDMessagesAreStreamingToMFApplication()
{
var processInfo = new ProcessStartInfo("C:\\ProgramData\\CME\\Java_SymLinks\\JDK8_x64\\jre\\bin\\java.exe",
"java -jar .\\Jar\\Injector\\MD-Injector-1.0.jar My.TOPIC")
{
CreateNoWindow = true,
UseShellExecute = false
};
Process proc;
if ((proc = Process.Start(processInfo)) == null)
{
throw new InvalidOperationException("Message injector failed to run");
}
proc.WaitForExit();
int exitCode = proc.ExitCode;
proc.Close();
}
[When(@"MF enriches template (.*)")]
public void WhenMFEnrichesTemplate(int p0)
{
ScenarioContext.Current.Pending();
}
[Then(@"The enriched messages are then written to an SQL DB server")]
public void ThenTheEnrichedMessagesAreThenWrittenToAnSQLDBServer()
{
ScenarioContext.Current.Pending();
}
}
}
When I run dotnet test
it is skipped with this alert:
Am I doing something wrong or should I reference my steps file from the feature file in some way?
Aucun commentaire:
Enregistrer un commentaire