Total Pageviews

Showing posts with label Appium. Show all posts
Showing posts with label Appium. Show all posts

Tuesday, October 28, 2014

Merge multiple TRX files (Visual Studio Test Result File)

TRX files are  Visual Studio test results file. For any reason, if you end up having multiple TRX file you still can merge all of them into one file using utility given below. Multiple TRX files can generate as a result of test suit failing and a re-run is required when only failed cases are executed.

Merge TRX files- (only 2 files at a time)
  1. Download this utility
  2. Copy all TRX files in the same folder
  3. USAGE: trxmerger.exe <input1>.trx <input2>.trx <output>.trx
Note: Pick up the TRX file which was created first (Check time stamp) and then move to the next one.Changes from second trx file will be overwritten on first if there are matching test cases.The merged file then can be merged with next one and so on.

Convert TRX file into more user friendly format like HTML-
  1. Download this utility
  2. USAGE:  VSTSTestReport.exe  "C:\<filename>.trx" <filename>.html



    Cheers!
    Abhay

Wednesday, September 24, 2014

Mobile Automation: Appium/AVD/Android/Windows - Device not found error,restarting adb server.[solved]

Platform: Windows 7 64 bit
Appium Version: AppiumForWindows-0.16
Android SDK:  adt-bundle-windows-x86_64-20140702

If anyone is working on Appium automation and trying to pull up some automation on Android/Apple and if you run across any errors like below-

debug: Checking whether adb is present
debug: Using adb from C:\AndroidSDK\adt-bundle-windows-x86_64-20140702\adt-bundle-windows-x86_64-20140702\sdk\platform-tools\adb.exe
debug: Trying to find a connected android device
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway
debug: Getting connected devices...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" devices
debug: Could not find devices, restarting adb server...
debug: executing: "D:\APPIUM\SDK\sdk\platform-tools\adb.exe" kill-server
warn: code=ENOENT, errno=ENOENT, syscall=spawn
error: Error killing ADB server, going to see if it's online anyway

This is most probably because appium/adb cannot read (and eventually expand)Windows System32 folder. Do following steps-

1. Open  command prompt and type "path" (no quotes).
2. Check if this path is present- C:\WINDOWS\system32. If not, go to step 3.
3. Add path like this in your system variable-  %SYSTEMROOT%\System32

PS: This worked for me, try your luck!

Cheers-
Abhay