The parameters in TestNG cannot be tied to groups. Because of that mistake I couldn't find the answer. They can be tied to tests or suits though, so, everything is OK.
<suite name="My suite">
<parameter name="first-name" value="Cedric"/>
<test name="Simple example">
............
@Parameters({ "first-name" })
@Test
public void testSingleString(String firstName) {
System.out.println("Invoked testString " + firstName);
assert "Cedric".equals(firstName);
}
The example is from the documentation.
So, we can set the value of a parameter from outside of the test code. Btw, tricks from @pwain fist reference can be useful in some situations, too, especially if we use JUnit instead of TestNG