Getting a New Colleague Started on Your Scrum Project

Let me share some experiences – which I posted earlier on the First8 blog – when introducing a new colleague to the team and getting him of her quickly integrated.

On my current job we’re expanding rapidly with the amount of Scrum teams. Project leads and architects are shoving all kinds of intakes around and it’s not uncommon to have several new software developers or testers start each week. When I myself settled in with another colleague we found ourselves in a busy period, where none of the existing teams actually had any time to explain which accounts and permissions to request to what system from what department to be able to dour jobs. If you’ve ever started in somewhat Enterprisy environment, it might look familiar. Continue reading “Getting a New Colleague Started on Your Scrum Project”

Quicktip! TestNG’s-like junit-dataprovider Instead of JUnit Parameterized Class

We all know JUnit test-classes can be parameterized, which means that for a given set of test-elements the test class is instantiated a few times, but using constructors for that isn’t always what you want.

I’ve taken the StringSortTest from this blog as an example.

@RunWith(Parameterized.class)
public class StringSortTest {

    @Parameters
    public static Collection<Object[]> data() {
        return Arrays.asList(new Object[][] {
                         { "abc", "abc" },
                         { "cba", "abc" },
         });
    }

    private final String input;
    private final String expected;

    public StringSortTest(final String input, final String expected) {
        this.input = input;
        this.expected = expected;
    }

    @Test
    public void testSort() {
        assertEquals(expected, mySortMethod(input));
    }
}

This is pretty darn obnoxious some times if you have multiple sets of data for various tests, which all go through the constructor which would force you to write multiple test classes. TestNG solves this better by allowing to provide separate data sets to individual test methods using the @DataProvider annotation. Continue reading “Quicktip! TestNG’s-like junit-dataprovider Instead of JUnit Parameterized Class”