“Don’t unit test the library/framework code,” is a good piece of advice. And yet, it’s so often ignored.

Kaylee‘s co-worker certainly ignored it. They also ignored the basic principle of “ensure the test will work tomorrow.”

[Test]
public void TestNewDate()
{
   String date = DateTime.Now.ToShortDateString();
   Assert.IsTrue(date == "26/08/2016");
}

Now, this test has been in the code base since 2016, as you might guess. It was not disabled or otherwise commented out. “But surely, their CI job would choke on it?” you might wonder. That assumes there is a CI job, and not a batch of tests that developers run manually, 70% of which pass and the remaining 30% have tickets in their ticketing software to get fixed “eventually”.

[Advertisement] BuildMaster allows you to create a self-service release management platform that allows different teams to manage their applications. Explore how!

Remy Porter

Source link

You May Also Like

Modern Activism: Confused Activist Struggles To Understand

{11 Comments} Shares, likes, online petitions: modern activism in a nutshell. Does…

Top odd jobs totally worth paying someone else to do (20 GIFs)

Once you hit 35, there are just some things that we as…

Santa Does Coke – People Of Walmart

The post Santa Does Coke appeared first on People Of Walmart. Luke…

Randomly hilarious memes that don’t need a reason to be funny (30 Photos)

Adam Source link