it:ad:specflow:howto:work_with_coded_ui_tests

IT:AD:SpecFlow:HowTo:Work with Coded UI Tests

It’s always like that…one small overlooked Attribute can make you do a lot of head banging.

The secret sauce is trivial: have to remove from the autogenerated TestClassAttribute.

[System.CodeDom.Compiler.GeneratedCodeAttribute("TechTalk.SpecFlow", "1.5.0.0")]
[System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
//[Microsoft.VisualStudio.TestTools.UnitTesting.TestClassAttribute()]
public partial class AdditionFeature

and replace it with a CodedUITest attribute, using a partial class in case it gets ovewritten:

[CodedUITest]
public partial class AdditionFeature { }

 

Once I figured it out, it of course turned out that the issue had been discussed in the forums here and at present (Feb 17,2010) there’s no way to do this by hand. Keep an eye on this too (https://github.com/techtalk/SpecFlow/issues#issue/39)

Note that the thread is interesting as it points out that one has to consider events too…

I’m watching…cause it’s awesome watching Specs ⇒ Recorded UI Tests. Such an easy sell to the team

  • /home/skysigal/public_html/data/pages/it/ad/specflow/howto/work_with_coded_ui_tests.txt
  • Last modified: 2023/11/04 01:57
  • by 127.0.0.1