Anyone have the idea about to create phone call for interrupt testing?

Anyone have the idea about to create phone call for interrupt testing?

I have the code say,

	String phone = "1111122222";
	String udid = "4d003e9be031ddsf";

	String startcall = "adb -s " + udid
			+ " shell am start -a android.intent.action.CALL -d tel:"
			+ phone;

	Process ex = Runtime.getRuntime().exec(startcall);

It will start call from device running the script but I need to stop the call in 10 seconds. Is it possible?

the process not destroy when I use ex.destroy();

Please help me to solve this issue

@sanoj27 eah you can disconnect the call using adb command
`Runtime.getRuntime().exec(“adb shell input keyevent 6”);

@auto-geek thanks. This is working for me. I need to make a call interrupt in iPhone like Android using adb commands. Is there any way to make the phone call interrupt in iPhone?

I would say, whatever you are doing is good. but certain things has to be test manually. Automation testing is only suitable for regression and major focus on functionality, that is the basic principal of automation testing.
Interrupt,UI and other non-functional (Security/performance) testing are not part of functional testing hence it is advisable not to test using automation. I would suggest think before you define scope of automation.

Priyank Shah

1 Like

As Priyank said we should draw a line on what needs and should be automated and what not. Somethings are better left for manual not because they can not be automated.
They can surely be automated(:pensive: personal experience i have done it)
It’s because they are simply not reliable and does not worth the time you spend over it.

P.S. Just my thought.