I'm not sure your question is BDD specific, but it's still good.
I usually recommend that all development be done with a continuous integration server that runs your tests every time you test, even for a private project where you work alone. Even my personal projects get this, because TeamCity is free, and the desktop for children at home is inactive when I register. Importance, if it is more obvious, if you work in a team because it ceases to be ever doubting when you get which will be built.
But it also stops your problem. You can tell very quickly when something is too specific, because it does not work on both your personal machine and the build machine. These problems exist, regardless of whether you work in BDD, TDD, ATDD or in any kind of testing.
Looking at your example above, I would say that it is very specific and also very fragile. If one of the third-party PCs shuts down one day, all your tests fail. If you used Specflow to run unit tests, I would recommend making fun of most of your code so you can test without invoking the test computer, but your example reads more as you try to perform system / integration testing.
Instead of specifying all your options separately, why not name the whole package
Given Im using the test pc
you can set many of them in a binding, and if you need to adapt them then, so that the tests pass anyway
[Given] public void GivenImUsingTheTestPc() { if (Environment.ComputerName == "d1234") { ipadress = 1.2.3.4; ....
This, obviously, only drives fragility, but at least it holds you now.
Alski
source share