To play a devil advocate, if you try , you will find that you are substantially more productive because of dynamic typing. just works much harder to improve productivity of the programmer, as compared to C# which is focused to create effective code (making programmer to work harder to get it). In , it is of little difference if test script is 20 ms faster (in C#), because tests in both languages just call the same libraries anyway. But if you can create test script one day sooner, it does make difference.

Python data structures are more flexible: it is trivial to create a dictionary with tuples as keys and lists as values. In C#, it is not as obvious. Many times Python debugger saved my bacon: fire it in the middle of test where interesting variables are instantiated, and you can interrogate them for properties and methods as they are, not as you think they should be by reading the code (as you do in C#).

Also, yield operator allowed me cool tricks when implementing page object. Not sure how easy is to create a generator returning tuples in C#, but in Python it is trivial.

Full disclosure: I used C# for a desktop application, did not enjoyed it, and changed job to one where Python is main language for both development and testing.

I understand that standardization on a single language is important. But I strongly believe that especially for testing, that language being Python has substantial competitive advantage over C#.

Maybe the person who suggested to try Python alongside C# wants to compare productivity and switch to the more productive platform? And I am pretty sure that Python will be a winner in that competition.

Source link


Please enter your comment!
Please enter your name here