Set custom name for JUnit Parameterized tests

For JUnit parameterized tests, you can add a descriptive name based on the parameter like this: @Parameters(name="{index}: {0} {1}") public static Collection<Object[]> data() { return Arrays.asList(new Object[][] { { "x", "y" }, { "foo", "bar" }, { "hello", "world" } }); } This will output test results like: [0: x y] [1: foo bar] [2: … Continue reading Set custom name for JUnit Parameterized tests

Advertisement

Checking XPATH and CSS Selectors in the browser console

There are a couple of magic functions you can use to inspect and parse an HTML document while you're reading it in the browser. $x() allows you to check an XPATH. It's basically a shorthand for document.evaluate(xpath, document); $$() allows you to check a CSS Selector. It's basically a shorthand for document.querySelectorAll(css); On Chrome $x() … Continue reading Checking XPATH and CSS Selectors in the browser console