-
Notifications
You must be signed in to change notification settings - Fork 3
EarlGrey
bootstraponline edited this page Aug 14, 2018
·
16 revisions
- Create shared scheme for
React - Add
Reactto Target Dependencies of test target build phases
- Change custom framework's
DYLIB_INSTALL_NAME_BASEfrom@rpathto@executable_path-
CustomFrameworktarget →Build Settings→Dynamic Library Install Name Base
-
- Add custom framework to
CopyFilesBuildPhasein the app test target-
EarlGrey.frameworkmust also be in this Copy Files phase
-
- Update
DYLD_INSERT_LIBRARIESenvironment variable in the test target scheme to@executable_path/EarlGrey.framework/EarlGrey:@executable_path/CustomEarlGrey.framework/CustomEarlGrey-
Product→Scheme→Manage Schemes...→Edit...→Test→Arguments→Environment Variables
-
-
DYLIB_INSTALL_NAME_BASE@rpathnot@executable_path -
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";not$(PROJECT_DIR)/../Pods/Pods/EarlGrey/EarlGrey -
IPHONEOS_DEPLOYMENT_TARGETset to 11.2 or below for Firebase Test Lab -
FRAMEWORK_SEARCH_PATHSmust include dir that contains the EarlGrey framework
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)$ brew update
$ brew install rbenv
Load rbenv automatically by appending the following to ~/.bash_profile or ~/.zshrc
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
Now source bash profile or zshrc:
$ source ~/.bash_profile$ source ~/.zshrc
and run the following commands:
$ rbenv install 2.3.3
$ rbenv global 2.3.3
$ echo "gem: --no-document" >> ~/.gemrc
$ gem update --system --no-document
$ gem install --no-document bundler fastlane cocoapodsNow manually run rbenv init
If Ruby 2.3.3 still isn't on your path, try reinstalling ruby:
rbenv install 2.3.3
Optionally symlink /usr/local/bin/ruby to ~/.rbenv/shims/ruby which ensures system Ruby points to rbenv Ruby.
ln -snf ~/.rbenv/shims/ruby /usr/local/bin/ruby
- Extend
GREYInteractionnotGREYElementInteractionotherwise there may be weird compile errors - Always use
GREYCondition::waitWithTimeout:pollInterval:and notGREYCondition::waitWithTimeoutotherwise the app may freeze due to the main thread getting blocked.- scanning the hierarchy with a
pollIntervalof zero will prevent the main thread from doing other work.
- scanning the hierarchy with a
func testStability() {
for _ in 1...1000 {
setUp()
// test code
tearDown()
}
}