Comments (5)
Ok, then if you are using CircleCI then you should also set the following environment variables as you did with the others, so the framework can access to them on iOS:
"CIRCLECI": $(CIRCLECI)
"CIRCLE_WORKING_DIRECTORY"= $(CIRCLE_WORKING_DIRECTORY)
"CIRCLE_BUILD_NUM"= $(CIRCLE_BUILD_NUM)
"CIRCLE_BUILD_URL"= $(CIRCLE_BUILD_URL)
"CIRCLE_WORKFLOW_ID"= $(CIRCLE_WORKFLOW_ID)
"CIRCLE_PROJECT_REPONAME"= $(CIRCLE_PROJECT_REPONAME)
"CIRCLE_SHA1"= $(CIRCLE_SHA1)
"CIRCLE_REPOSITORY_URL"= $(CIRCLE_REPOSITORY_URL)
"CIRCLE_BRANCH"= $(CIRCLE_BRANCH)
"CIRCLE_TAG"= $(CIRCLE_TAG)
Even when the env var are accessible in the system if you don't add them to the project, iOS processes cannot access them (macOS processes can, but not iOS).
With this change you should be able to have the complete git information, and you will also get information about the CircleCI process and a URL to access the CircleCI pipeline workflow directly.
Also, be sure you select your main target in Expand variables based on
(or Target for Variable Expansion
if using test plans) as shown here
Please let me know if it solves your issues.
from dd-sdk-swift-testing.
Yes, CircleCI just finished running and it's reporting correctly!
Thank you very much for your help.
from dd-sdk-swift-testing.
Hi Errol,
The testing framework tries to fetch Git metadata using the local .git folder on the project. In some cases that is not possible like when running on a physical device( where the source code is not on the device), if the .git folder is not located in
SRCROOT or a parent of it, or if there is a bug in the framework code (which might be the issue here, because you say that only branch information is missing).
For those cases there is a section in the docs: here where it documents the environment variables also needed to use depending on your CI provider. That you donโt mention in the environment variables you are using, so you should also add.
There is a subsection there where it says: Additional Git configuration for physical device testing:
, if you set those environment variables the git information will be recovered form the environment variables of your CI provider instead of the local git folder and should fox your issues.
Let me know if it works.
Thanks
from dd-sdk-swift-testing.
Hi Ignacio,
Thanks for the quick response.
We are only using Simulator on CircleCI so the CIRCLE_BRANCH
env var is available. The .git
folder should be there as well. It might be a bug on the backend rather than the Swift SDK. If you need more info, let me know and I'll try to provide it. Datadog is a lifesaver and we look forward to using this new tool!
Folder structure
.git/ Project.xcworkspace/ iOS/ iOS-Project.xcodeproj/ Sources/ Tests/ macOS/ macOS-Project.xcodeproj/ Sources/ Tests/ Shared/ # Source code that both projects use Sources/ Tests/ # Test below exists here
This is an image of what we see on DD for the same test. iOS reports much later because it takes longer to build and has more tests.
from dd-sdk-swift-testing.
I am glad it worked. Please don't hesitate in reporting any problem or feedback you can have with the tool.
from dd-sdk-swift-testing.
Related Issues (18)
- [Question] Cocoapods support HOT 11
- [Question] Manual launch support HOT 6
- [Question] Xcode 13 automatic test repetition compatibility HOT 2
- Working locally, failing in the CI (Jenkins) HOT 16
- Data Dog sdk was compiled without bitcode and itโs preventing from generating a release build HOT 1
- Manually report test progress and result HOT 22
- Can't archive app due to missing bitcode HOT 9
- Manual reporting of test results no longer working HOT 2
- SPM unable to resolve 2.1.1 HOT 13
- Not getting any results using SPM HOT 10
- Flakiness detection not working properly with retry-tests-on-failure and test-iterations xcodebuild parameters HOT 4
- [Question] Annotate tests with ownership HOT 1
- Issues with network instrumentation after bumping to 2.2.0
- Bug detecting codeowners for tests
- Disable NTPClock
- Testing SDK crashes while running tests in parallel
- Don't embed the testing SDK dependencies in XCFramework
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dd-sdk-swift-testing.