Compare equality between two objects in NUnit

Do not override Equals just for testing purposes. It’s tedious and affects domain logic. Instead, Use JSON to compare the object’s data No additional logic on your objects. No extra tasks for testing. Just use this simple method: public static void AreEqualByJson(object expected, object actual) { var serializer = new System.Web.Script.Serialization.JavaScriptSerializer(); var expectedJson = serializer.Serialize(expected); … Read more

Selenium Error – The HTTP request to the remote WebDriver timed out after 60 seconds

I had a similar issue using the Chrome driver (v2.23) / running the tests thru TeamCity. I was able to fix the issue by adding the “no-sandbox” flag to the Chrome options: var options = new ChromeOptions(); options.AddArgument(“no-sandbox”); I’m not sure if there is a similar option for the FF driver. From what I understand … Read more

How can we run a test method with multiple parameters in MSTest?

EDIT 4: Looks like this is completed in MSTest V2 June 17, 2016: https://blogs.msdn.microsoft.com/visualstudioalm/2016/06/17/taking-the-mstest-framework-forward-with-mstest-v2/ Original Answer: As of about a week ago in Visual Studio 2012 Update 1 something similar is now possible: [DataTestMethod] [DataRow(12,3,4)] [DataRow(12,2,6)] [DataRow(12,4,3)] public void DivideTest(int n, int d, int q) { Assert.AreEqual( q, n / d ); } EDIT: It … Read more