Search This Blog

Wednesday 9 December 2015

Ignore JUnit Test Case

How can we stop a test case not to run??


Dont use java comment to comment the test case function,
Please use @Ignore annotation to comment test case,


Example


on function level


@Ignore("not ready yet")
@Test public void testOnething() {
System.out.println("This method is ignored because its not ready yet");
}


on class level

@Ignore public class Ignored {
@Test public void test1() {
System.out.println("Ignored test case 1");
}
@Test public void test2() {
System.out.println("Ignored test case 2");
}
 }

Monday 7 December 2015

How to turn off interactive prompt while sending bulk files to an ftp server



When we want to send 1000 number of files at a time to an ftp server,

We will use mput *, but for every file it will ask you to enter yes or no to transfer the file,
to avoid this,
use command prompt.

Example below

ftp hostname
username : username
password : password
prompt (this will turn off interactive mode)

now you use mput * to send all files .