में समांतर में जुनीट पैरामीटर परीक्षण चला रहा था, मैं सोच रहा था कि पैरामीटर परीक्षणों को परिभाषित करते समय प्रोग्रामिंग रूप से समानांतर में जुनीट परीक्षण चलाने के लिए संभव है या नहीं। विचार तब उन्हें ग्रहण में नियमित जुनीट परीक्षण के रूप में चलाने में सक्षम होना होगा।ग्रहण
मेरे वर्तमान कोड के लिए कुछ इसी तरह है:
@RunWith(Parameterized.class)
public class JUnitDivideClassTests {
@Parameters
public static Collection<Object[]> data() {
return Arrays.asList(new Object[][] { { 12, 3, 4 }, { 12, 2, 6}, { 12, 4, 3 }});
}
private int n;
private int d;
private int q;
public JUnitDivideClassTests(int n, int d, int q) {
this.n = n;
this.d = d;
this.q = q;
}
@Test
public void test() {
Assert.assertEquals(q, n/d);
}
}
के रूप में @http://codemadesimple.wordpress.com/2012/01/17/paramtest_with_junit/
यह काम करता है, धन्यवाद –