Re: passing arguments to test case while adding them to test suite

"ishan gupta [email protected] [junit]" <[email protected]> Tue, 25 Nov 2014 09:11:26 +0000 (UTC)
Newsgroups gmane.comp.java.junit.user
Message-ID <1413519432.402632.1416906686902.JavaMail.yahoo@jws10058.mail.ne1.yahoo.com>
Hi,yes i want to pass the arguments to the method defined in myClass 

     On Tuesday, November 25, 2014 1:20 AM, "Manan Patel [email protected] [junit]" <[email protected]> wrote:
   

     Is it the myClass that you want to pass in parameter or you want to pass another class

Sent from my iPad
On 24-Nov-2014, at 10:29 am, "[email protected] [junit]" <[email protected]> wrote:


    hi all,
i need help on passing arguments to a test case when i am adding it to test suite.for example:
myClass has a method testingMethod(String arg1, String arg2) which takes 2 arguments as input.now i am adding myClass to a test suite using suite.addTest(myClass.class).
i need to pass 2 string arguments also along with the class name so that the method testingMethod receives the parameter values.
Kindly help me on this topic.Thanks in advance.Ishan  
  #yiv9485573684 #yiv9485573684 -- #yiv9485573684ygrp-mkp {border:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv9485573684 #yiv9485573684ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv9485573684 #yiv9485573684ygrp-mkp #yiv9485573684hd {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px 0;}#yiv9485573684 #yiv9485573684ygrp-mkp #yiv9485573684ads {margin-bottom:10px;}#yiv9485573684 #yiv9485573684ygrp-mkp .yiv9485573684ad {padding:0 0;}#yiv9485573684 #yiv9485573684ygrp-mkp .yiv9485573684ad p {margin:0;}#yiv9485573684 #yiv9485573684ygrp-mkp .yiv9485573684ad a {color:#0000ff;text-decoration:none;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ygrp-lc {font-family:Arial;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ygrp-lc #yiv9485573684hd {margin:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ygrp-lc .yiv9485573684ad {margin-bottom:10px;padding:0 0;}#yiv9485573684 #yiv9485573684actions {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv9485573684 #yiv9485573684activity {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv9485573684 #yiv9485573684activity span {font-weight:700;}#yiv9485573684 #yiv9485573684activity span:first-child {text-transform:uppercase;}#yiv9485573684 #yiv9485573684activity span a {color:#5085b6;text-decoration:none;}#yiv9485573684 #yiv9485573684activity span span {color:#ff7900;}#yiv9485573684 #yiv9485573684activity span .yiv9485573684underline {text-decoration:underline;}#yiv9485573684 .yiv9485573684attach {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv9485573684 .yiv9485573684attach div a {text-decoration:none;}#yiv9485573684 .yiv9485573684attach img {border:none;padding-right:5px;}#yiv9485573684 .yiv9485573684attach label {display:block;margin-bottom:5px;}#yiv9485573684 .yiv9485573684attach label a {text-decoration:none;}#yiv9485573684 blockquote {margin:0 0 0 4px;}#yiv9485573684 .yiv9485573684bold {font-family:Arial;font-size:13px;font-weight:700;}#yiv9485573684 .yiv9485573684bold a {text-decoration:none;}#yiv9485573684 dd.yiv9485573684last p a {font-family:Verdana;font-weight:700;}#yiv9485573684 dd.yiv9485573684last p span {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv9485573684 dd.yiv9485573684last p span.yiv9485573684yshortcuts {margin-right:0;}#yiv9485573684 div.yiv9485573684attach-table div div a {text-decoration:none;}#yiv9485573684 div.yiv9485573684attach-table {width:400px;}#yiv9485573684 div.yiv9485573684file-title a, #yiv9485573684 div.yiv9485573684file-title a:active, #yiv9485573684 div.yiv9485573684file-title a:hover, #yiv9485573684 div.yiv9485573684file-title a:visited {text-decoration:none;}#yiv9485573684 div.yiv9485573684photo-title a, #yiv9485573684 div.yiv9485573684photo-title a:active, #yiv9485573684 div.yiv9485573684photo-title a:hover, #yiv9485573684 div.yiv9485573684photo-title a:visited {text-decoration:none;}#yiv9485573684 div#yiv9485573684ygrp-mlmsg #yiv9485573684ygrp-msg p a span.yiv9485573684yshortcuts {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv9485573684 .yiv9485573684green {color:#628c2a;}#yiv9485573684 .yiv9485573684MsoNormal {margin:0 0 0 0;}#yiv9485573684 o {font-size:0;}#yiv9485573684 #yiv9485573684photos div {float:left;width:72px;}#yiv9485573684 #yiv9485573684photos div div {border:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv9485573684 #yiv9485573684photos div label {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv9485573684 #yiv9485573684reco-category {font-size:77%;}#yiv9485573684 #yiv9485573684reco-desc {font-size:77%;}#yiv9485573684 .yiv9485573684replbq {margin:4px;}#yiv9485573684 #yiv9485573684ygrp-actbar div a:first-child {margin-right:2px;padding-right:5px;}#yiv9485573684 #yiv9485573684ygrp-mlmsg {font-size:13px;font-family:Arial, helvetica, clean, sans-serif;}#yiv9485573684 #yiv9485573684ygrp-mlmsg table {font-size:inherit;font:100%;}#yiv9485573684 #yiv9485573684ygrp-mlmsg select, #yiv9485573684 input, #yiv9485573684 textarea {font:99% Arial, Helvetica, clean, sans-serif;}#yiv9485573684 #yiv9485573684ygrp-mlmsg pre, #yiv9485573684 code {font:115% monospace;}#yiv9485573684 #yiv9485573684ygrp-mlmsg * {line-height:1.22em;}#yiv9485573684 #yiv9485573684ygrp-mlmsg #yiv9485573684logo {padding-bottom:10px;}#yiv9485573684 #yiv9485573684ygrp-msg p a {font-family:Verdana;}#yiv9485573684 #yiv9485573684ygrp-msg p#yiv9485573684attach-count span {color:#1E66AE;font-weight:700;}#yiv9485573684 #yiv9485573684ygrp-reco #yiv9485573684reco-head {color:#ff7900;font-weight:700;}#yiv9485573684 #yiv9485573684ygrp-reco {margin-bottom:20px;padding:0px;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ov li a {font-size:130%;text-decoration:none;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv9485573684 #yiv9485573684ygrp-sponsor #yiv9485573684ov ul {margin:0;padding:0 0 0 8px;}#yiv9485573684 #yiv9485573684ygrp-text {font-family:Georgia;}#yiv9485573684 #yiv9485573684ygrp-text p {margin:0 0 1em 0;}#yiv9485573684 #yiv9485573684ygrp-text tt {font-size:120%;}#yiv9485573684 #yiv9485573684ygrp-vital ul li:last-child {border-right:none !important;}#yiv9485573684