I am using Appium for test automation, please let me know how to find code coverage of scripts written for Appium.
Related
Mobile test automation has been performed in Robot Framework using IONIC 6 app with Appium and Android Studio . However Xpath is getting changed after each build given by developer.
Actual : Xpath always needs to be changed after each build
Expected: Xpath should be stable and no much rework in the existing scripts
When I run my tests inside Xcode the code coverage is 10.3%. When running fastlane run xcov for the same scheme the code coverage is 17.17%. The xcov html file shows the same files with the same coverage percentages, only the total coverage is incorrect. How can this be?
I've had the same problem and it turned out that the Xcode versions were not the same. I updated Fastlane's Xcode version to the one I'm using locally and the coverage is the same
xcode 8 shows 0 code coverage when running xctest uitests using xcodebuild, however when running from xcode the coverage details are shown.
I tried adding unittests as suggested in below stackoverflow question, however that too does not help when running the uitest's using xcodebuild
UI Test Case not show code coverage.
below stackoverflow question seem's to say that code coverage cannot be obtained for uitest's , but my question is how is xcode able to show the code coverage for uitest's
Xcode 7.3.1 UITests Code Coverage always at 0%
I've been trying to find a way to run a single iOS unit test among multiple tests with the command line on an iOS device.
Here is what I've found thus far...
I can use xcodebuild test [options] to build & run every tests.
Found a tool called xctest in /Applications/Xcode.app/Contents/Developer/usr/bin. I've looked up in the man page and it is possible to run a single test. When I try using it, I get an error stating that I'm using x86_64 architecture and then a posix error pops after. This seems to indicate that it might be the xctest for Mac OS X apps.
Found another xctest in for the iPhone Simulator.. but I want to run it on a iOS device
I know that it is possible to select the tests I wish to run in a scheme, but this is problematic since I would need a very skillful & patient monkey to manually do this in a build system.
By the way, I am not using Apple's own Continuous Integration system with bots and using it is out of question because another build system is used for every other platform.
My question is: How can I run a single unit test (XCTest) from the command line with build automation in mind?
P.S: I don't have any code signing issues.
Try using xctool which can run tests on devices https://github.com/facebook/xctool
I am upgrading a Jenkins CI server from XCode 4.6 to XCode 5 and iOS SDK 7.
To run unit tests, I must now use xcodebuild test. I am piping the output of this command to a Ruby script, that generates test reports.
This does not work any longer after the upgrade. I think the problem lies in the fact that xcodebuild test launches a new process to actually run the tests. The last statement in my log is
/bin/sh -c /Volumes/Data/Jenkins/jobs/MyProject-Unit/workspace/Build/Intermediates/Redacted.build/Debug-iphonesimulator/UnitTests.build/Script-261C7EA912FD9A4B00F7A53E.sh
The output after that point can not be found in the Jenkins log, but when I run it on my own machine, I get the test results printed in the console.
What is happening here, and how can I get the test reports back ?
I'm on the same trail. I believe if you look into that script, it will turn around and call this script:
${SYSTEM_DEVELOPER_DIR}/Tools/RunUnitTests
This is script that used to run unit tests. Now, in Xcode 5, it just tells you to remove the Run Script build phase that Xcode 4 automatically creates. If you run RunUnitTests from Xcode 5, it just says:
RunUnitTests is obsolete. To run unit tests for your target, use the
Test scheme action in the Xcode IDE and the test action in xcodebuild.
You can remove the Run Script build phase that invokes RunUnitTests
from your unit test bundle target.
I've gone ahead and done what it says (removed the Run Script phase) and I still get no output under Jenkins, perhaps because, as you surmise, it's a new process, and Jenkins sees the first process complete, and jumps out.
Update: More info here: How can I get Xcode 5 to run iOS unit tests on a Jenkins slave?