unable to obtain stable firefox connection in 60 seconds (127.0.0.1:7055)

[Update – this can (was for me) still be a fix for this issue in 2015 |mdurrant|] I came across this problem lately. You should upgrade to capybara v1.0.1 to have a correct selenium webdriver. To be sure I added: gem ‘selenium-webdriver’, ‘2.25.0’ in my Gemfile. Important note: The selenium-webdriver gem is updated, and a … Read more

How do you test an Android application across multiple Activities?

I feel a bit awkward about answering my own bounty question, but here it is… I’ve searched high and low on this and can’t believe there is no answer published anywhere. I have come very close. I can definitely run tests that span activities now, but my implementation seems to have some timing issues where … Read more

Gradle Test Dependency

You can expose the test classes via a ‘tests’ configuration and then define a testCompile dependency on that configuration. I have this block for all java projects, which jars all test code: task testJar(type: Jar, dependsOn: testClasses) { baseName = “test-${project.archivesBaseName}” from sourceSets.test.output } configurations { tests } artifacts { tests testJar } Then when … Read more

Run code once before and after ALL tests in xUnit.net

As of Nov 2015 xUnit 2 is out, so there is a canonical way to share features between tests. It is documented here. Basically you’ll need to create a class doing the fixture: public class DatabaseFixture : IDisposable { public DatabaseFixture() { Db = new SqlConnection(“MyConnectionString”); // … initialize data in the test database … … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)