-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_StartFlowDroid.py
23 lines (18 loc) · 1.02 KB
/
test_StartFlowDroid.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from unittest import TestCase
from StartFlowDroid import runFlowDroid
from os import path
import os
longtime_apk='F:\Project\App\MX_Player_v1.14.5_apkpure.apk'
# you can download this app if want or try any other app but make sure it takes more than 5 min with FD (https://apkpure.com/mx-player/com.mxtech.videoplayer.ad/download)
shortime_apk='F:\Project\App\Angry Birds 1_3_5.apk'
jar_dir='c:/tools/platforms' #changed to your jars directory
Anaylsis_output=os.getcwd()+'/Analysis_Output/'
aps="F:\Project\App\\4G_Speed_UC.apk"
class TestTimeout(TestCase):
def test_run_flow_droid(self): #testing long time analysis
self.assertFalse(runFlowDroid(longtime_apk,'',jar_dir))
class TestResult(TestCase):
def test_run_flow_droid(self): #testing short time analysis
result=Anaylsis_output+path.basename(shortime_apk).replace('.apk', '_FD.txt').replace(" ","_")
result=result.replace('/','_').replace('\\','_')
self.assertEqual(runFlowDroid(shortime_apk,'',jar_dir).replace('\\','_').replace('/','_'),result)