Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configure cultureInfo for Specflow

I have two machines with different cultures where the format mm/dd/yyyy is successfully parsed by Specflow (it's a step argument) in one but fails in the other.

I want my tests to be culture independent. So how to configure Specflow to use CultureInfo.InvariantCulture for parsing dates ?

like image 468
yiabiten Avatar asked Oct 27 '15 17:10

yiabiten


1 Answers

Well, as nobody answered this. My solution for the problem was to edit the App.config file and add <bindingCulture name="en-US" /> in the <specflow> config section.

This forces Specflow, on both machines, to correctly parse MM/dd/yyyy date format.

like image 198
yiabiten Avatar answered Nov 02 '22 13:11

yiabiten