Forum Discussion
Hi,
One more thing I would recommend to try is to use not obfuscated build of the tested application.
(Yes, I agree that those will be two different applications and additional (manual) testing for the obfuscated application must be done to ensure that application does not crash after been obfuscated with the given obfuscation settings. The good news is that no functional testing is usually needed in this case. Just a quick verification that application does not crash, shortcuts are working, text is displayed as expected, etc.)
- vthomeschoolmom6 years agoSuper Contributor
Ok, I was given the instrumented app by someone else who cannot remember how it was done. I had read through the tutorial but skipped that part thinking it was done properly. I am not sure given this sentence in the instrumentation documentation.
" However, in this case, you will be able to create only image-based tests. "
I will redo this. Thanks for your help.
S
- AlexKaras6 years agoChampion Level 3
Hi,
> I was given the instrumented app by someone else who cannot remember how it was done.
Note, that application must be instrumented using the same version of TestComplete that will be used to run the test.
P.S. Sample code to check instrumentation:
//----------------------------------------------------------------------------- // From: http://blog.falafel.com/instrumenting-android-apps-ii/ // From: http://blog.falafel.com/instrumenting-android-apps-iii/ function AppInstrumentationVerify(strAppName : string; bStopTestRun : OleVariant = true) : OleVariant; var app : OleVariant; var boolResult : OleVariant; var strMsg : string; begin app := evaluate(aqString.Format('TestedApps.%s;', strAppName)); if (not app.Instrumented) then begin app.UseCustomCertificate := false; app.BackupOriginalAPK := true; boolResult := app.Instrument(); if (boolResult) then Log.Message(aqString.Format( '%s tested application has not been instrumented so TestComplete did this to get access to its internals', aqString.Quote(strAppName)), strAppName) else Log.Warning(aqString.Format( 'TestComplete failed to instrument the %s tested application', aqString.Quote(strAppName)), strAppName); end; boolResult := app.InstrumentedWithSupportedVersion; if (not boolResult) then begin if (bStopTestRun) then strMsg := ' Test run stopped.' else strMsg := ''; Log.Warning(aqString.Format( '%s instrumentation is NOT compatible with TestComplete v.%i.%i.%s', app.APKFileName, getRunningTCMajorVersion(), getRunningTCMinorVersion(), strMsg), app.APKFileName); if (bStopTestRun) then Runner.Stop(false); end; result := boolResult; end; //-----------------------------------------------------------------------------