The best solution that I found for my problem is to use PropertiesConfiguration of Apache Commons Configuration. It is very simple to use:
In my .properties file :
test1= Path1,Path2
test2= Path3,Path4
Then I read the .properties file automatically and I retrieve paths as a String array for each test.
@Parameters
public static Collection<Object[]> readPropertiesFile(){
ArrayList<Object[]> result= new ArrayList<Object[]>();
try {
Configuration config = new PropertiesConfiguration("testPaths.properties");
Iterator<String> keys=config.getKeys();
while(keys.hasNext()){
String[] paths= config.getStringArray(keys.next());
result.add(paths);
}
} catch (ConfigurationException e) {
e.printStackTrace();
}
return result;
}