Or from other place..
- What I want: get all scenario names on start test, but without start all tests.
- What I tried: by assembly reflection I scanned content, but one contain only feature names and method names. Not scenario names. (from this: Get list of tests in nunit library programmatically without having to run tests) Also exist ScenarioContext, but it contain only current names. Not all existing in testsuite.
What i am using:
- Specflow for describe.
- NUnit for run. VS2019.
- TestRail for result collect. TestSuite contains testName equal test describe in Specflow.
I hope it possible. Thanks to all!
.feature.cs
files generated from each feature file. They should be NUnit test classes. You should be able to use class reflection to read the attributes over the class names and methods. – Greg Burghardt[NUnit.Framework.DescriptionAttribute("First method. SaveForExample")]
I researched and obtain inherinatceDescriptionAttribute : PropertyAttribute
. github.com/nunit/nunit/blob/master/src/NUnitFramework/framework/… And PropertyAttribute.cs containsreadonly PropertyBag properties = new PropertyBag();
andproperty Properties
. But I do`nt have result. =( – aleksefy