SpecFlowOSS / SpecFlow

#1 .NET BDD Framework. SpecFlow automates your testing & works with your existing code. Find Bugs before they happen. Behavior Driven Development helps developers, testers, and business representatives to get a better understanding of their collaboration
https://www.specflow.org/
Other
2.24k stars 754 forks source link

SpecFlow #2548

Closed AffluentAnilKumarPal closed 2 years ago

AffluentAnilKumarPal commented 2 years ago

SpecFlow Version

3.9.40

Which test runner are you using?

NUnit

Test Runner Version Number

SpecRun.Runner: "3.9.31"

.NET Implementation

.NET 5.0

Project Format of the SpecFlow project

Classic project format using <PackageReference> tags

.feature.cs files are generated using

SpecFlowSingleFileGenerator custom tool

Test Execution Method

TFS/VSTS/Azure DevOps – Task – PLEASE SPECIFY THE NAME OF THE TASK

SpecFlow Section in app.config or content of specflow.json

i am new and i dont have specFlow.json and app.config file on my framework

Issue Description

i am using specFlow for test automation using restSharp library and i am able to run the test successfully on Azure Devops pipeline but at the end of the execution i am facing below issue.

[error]An exception occurred while invoking executor 'executor://specrun/executorV3.9.31': Exception has been thrown by the target of an invocation.

[error]Stack trace:

[error] at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean wrapExceptions, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& hasNoDefaultCtor)

[error] at System.RuntimeType.CreateInstanceDefaultCtorSlow(Boolean publicOnly, Boolean wrapExceptions, Boolean fillCache)

[error] at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, Boolean wrapExceptions)

[error] at System.Activator.CreateInstance(Type type, Boolean nonPublic, Boolean wrapExceptions)

[error] at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.TestPluginManager.CreateTestExtension[T](Type extensionType)

[error] at Microsoft.VisualStudio.TestPlatform.Common.ExtensionFramework.Utilities.LazyExtension`2.get_Value()

[error] at Microsoft.VisualStudio.TestPlatform.CrossPlatEngine.Execution.BaseRunTests.RunTestInternalWithExecutors(IEnumerable`1 executorU

test summary riExtensionMap, Int64 totalTests)

[error]Inner exception: Could not load file or assembly 'TechTalk.SpecRun.Common, Version=3.9.0.0, Culture=neutral, PublicKeyToken=d0fc5cc18b3b389b'. The system cannot find the file specified.

[error]Stack trace:

[error] at TechTalk.SpecRun.Framework.CurrentExecutionModelSettings.GetCurrent()

[error] at TechTalk.SpecRun.Framework.SubfolderAssemblyResolver.Enable()

[error] at TechTalk.SpecRun.VisualStudio.TestAdapter.SpecRunTestExecutor..ctor()

Passed ("Scenario Name") Results File: D:\a_temp\TestResults\VssAdministrator_fv-az78-542_2022-01-21_08_37_24.trx

[error]Test Run Failed.

Total tests: 82 Passed: 82 Total time: 5.4543 Minutes Vstest.console.exe exited with code 1. **** Completed test execution ***** Test results files: D:\a_temp\TestResults\VssAdministrator_fv-az78-542_2022-01-21_08_37_24.trx Created test run: 1488876 Publishing test results: 92 Publishing test results to test run '1488876'. TestResults To Publish 92, Test run id:1488876 Test results publishing 92, remaining: 0. Test run id: 1488876 Published test results: 92 Publishing Attachments: 1 Execution Result Code 1 is non zero, checking for failed results Completed TestExecution Model...

[warning]Vstest failed with error. Check logs for failures. There might be failed tests.

[error]Error: The process 'D:\a_tasks\VSTest_ef087383-ee5e-42c7-9a53-ab56c98420f9\2.195.0\Modules\DTAExecutionHost.exe' failed with exit code 1

[error]Vstest failed with error. Check logs for failures. There might be failed tests.

Steps to Reproduce

Only run the auzre pipeline and below YAML file i am using for the pipeline.

trigger: none

pool: vmImage: 'windows-latest'

schedules:

variables: solution: './TradeAPI/SETA_v2.sln' projectToPublish: './Folder1/Folder/MainProjectFile.csproj' buildPlatform: 'Any CPU' buildConfiguration: 'Release' dotnetSdkVersion: '5.x'

steps:

Link to Repro Project

No response

SabotageAndi commented 2 years ago

As we stopped maintaining the SpecFlow+ Runner (specflow.org/using-specflow/the-retirement-of-specflow-runner) I am closing this issue.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.