VB.NET & SpecFlow

494 views
Skip to first unread message

Marcus Hammarberg

unread,
Feb 3, 2010, 3:00:12 AM2/3/10
to SpecFlow
Hello,

I don't like VB.NET but unfortunally my current customer has it has
set language (500+ developers...).

OK - but I still want to use SpecFlow which I like a lot.

I read from your site () that you're supporting all .NET languages but
I cannot see the SpecFlow-templates for when I have a VB.NET project.

Am I doing anything wrong? Is there a workaround for the problem?
/Marcus Hammarberg
www.marcusoft.net

jbandi

unread,
Feb 3, 2010, 5:25:03 PM2/3/10
to SpecFlow
Ok, this is a bold statement on the website ;-)

This was rather meant in the sense that you can use SpecFlow and step
definitions written in C# to test any .Net project.

Currently VB is not supported for writing step definitions.

I think it would be very easy to support VB to write step definitions
in the future. The question is if this would be enough for you?

Currently SpecFlow relies on a certain grade on code generation. The
VisualStudio integration or the commandline-tool generate unit-test-
classes from the feature files that then can be executed by an
apropriate unit-test runner (NUnit, MsTest). This generated code will
probably always be C#, but since it is pretty hidden from the
developer this might be acceptable for you.
So the project that contains the feature files must always be a C#
project.

Would you be satisfied, if you could write your step-definitions in
another VB-project?

Regards
jonas

Marcus Hammarberg

unread,
Feb 8, 2010, 1:46:01 AM2/8/10
to SpecFlow
Hehehe ... yeah old VB.NET always stirs up a few feelings.

Well - I think that is a perfectly acceptable solution.

And for the record - I want to use C#. I long to use C#, but my
CUSTOMER doesn't wanna... :(

Thank you Jonas, for a good response
/Marcus

jbandi

unread,
Feb 11, 2010, 4:50:29 PM2/11/10
to SpecFlow
I pushed a changeset that allows to use steps defined in other
assemblies. This now enables to write step definitions in VB.

I also pushed an example with a scenario that uses steps written in VB
and C# at the same time (see Tests/FeatureTests/ExternalSteps).
http://github.com/techtalk/SpecFlow/tree/20461dc10709bc69b450a02be67ac9e16280279f/Tests/FeatureTests/ExternalSteps

For the configuration see the App.config. There is a new optional
section <stepAssemblies>:
http://github.com/techtalk/SpecFlow/blob/20461dc10709bc69b450a02be67ac9e16280279f/Tests/FeatureTests/App.config

-jonas

Reply all
Reply to author
Forward
0 new messages