All Projects → onmyway133 → TestTarget

onmyway133 / TestTarget

Licence: other
🐳 Notes on configuring test targets

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to TestTarget

ccheck
A command line tool for validating Kubernetes configs with rego
Stars: ✭ 63 (+43.18%)
Mutual labels:  test
last fm
A simple app to demonstrate a testable, maintainable, and scalable architecture for flutter. flutter_bloc, get_it, hive, and REST API are some of the tech stacks used in this project.
Stars: ✭ 134 (+204.55%)
Mutual labels:  test
awesome-testing
Software Testing for QA.
Stars: ✭ 48 (+9.09%)
Mutual labels:  test
htest
htest is a http-test package
Stars: ✭ 24 (-45.45%)
Mutual labels:  test
assert
Go 语言 assert 断言函数
Stars: ✭ 17 (-61.36%)
Mutual labels:  test
jest-retry
Jest retry pattern for flaky E2E tests
Stars: ✭ 36 (-18.18%)
Mutual labels:  test
pynvme
builds your own tests.
Stars: ✭ 139 (+215.91%)
Mutual labels:  test
raise if
one liner `raise Exception if condition` for Python
Stars: ✭ 15 (-65.91%)
Mutual labels:  test
J1939-Framework
Framework to work with J1939 Frames used in CAN bus in bus, car and trucks industries
Stars: ✭ 123 (+179.55%)
Mutual labels:  test
lint-html-with-css
Lint HTML with CSS. A collection of CSS snippets from the hashtag #lintHTMLwithCSS on twitter. These CSS snippets intend to warn developers about common mistakes made in HTML.
Stars: ✭ 35 (-20.45%)
Mutual labels:  test
jpa-unit
JUnit extension to test javax.persistence entities
Stars: ✭ 28 (-36.36%)
Mutual labels:  test
Jive.jl
some useful steps in tests 👣
Stars: ✭ 41 (-6.82%)
Mutual labels:  test
octane-testbench
⛽ Set of utilities to test Laravel applications powered by Octane.
Stars: ✭ 35 (-20.45%)
Mutual labels:  test
eat
Json based scenario testing tool(which can have test for functional and non-functional)
Stars: ✭ 41 (-6.82%)
Mutual labels:  test
sa11y
Salesforce Automated Accessibility Testing Libraries
Stars: ✭ 58 (+31.82%)
Mutual labels:  test
dextool
Suite of C/C++ tooling built on LLVM/Clang
Stars: ✭ 81 (+84.09%)
Mutual labels:  test
es-feature-detection
ECMAScript feature and API detection
Stars: ✭ 16 (-63.64%)
Mutual labels:  test
cypress-maildev
Cypress Maildev is a bunch of Cypress commands in order to test your messages (SMS and Emails) by using Maildev REST API.
Stars: ✭ 19 (-56.82%)
Mutual labels:  test
html-comment-regex
Regular expression for matching HTML comments
Stars: ✭ 15 (-65.91%)
Mutual labels:  test
r spec-clone.rb
A minimalist RSpec clone with all the essentials.
Stars: ✭ 38 (-13.64%)
Mutual labels:  test

TestTarget

❤️ Support my app ❤️

❤️❤️😇😍🤘❤️❤️

Notes on configuring test targets

This applies to

  • Main targets
    • App
    • Framework
  • Test targets
    • Unit tests
    • UI tests

Examples

Dependencies used

Examples

  • Cocoapods
  • Carthage

Notes

  • Make sure test target can link to all the frameworks it needs. This includes frameworks that Test targets use, and possibly frameworks that Main target uses !
  • Remember to "Clean Build Folder" and "Clear Derived Data" so that you're sure it works. Sometimes Xcode caches.

Errors

Errors occur mostly due to linker error

  • Test target X encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted
  • Framework not found

Cocoapods

1. Pod

Test targets need to include pods that Main target uses !

or we'll get "Framework not found"

def app_pods
	pod 'Sugar', '~> 1.0'
end

def test_pods
	pod 'Nimble', '~> 3.2'
	pod 'Quick', '~> 0.9'
end

target 'TeaApp' do
	app_pods
end

target 'TeaAppTests' do
	app_pods
	test_pods
end

target 'TeaAppUITests' do
	app_pods
	test_pods
end

2. Link Binaries with Library

Cocoapods builds a framework that contains all the frameworks the Test targets need, and configure it for us

3. Runpath Search Paths

  • Go to Test target Build Settings
  • Add $(FRAMEWORK_SEARCH_PATHS)

Carthage

1. Cartfile

We usually have

  • Cartfile for Main target
github "hyperoslo/Sugar" ~> 1.0
  • Cartfile.private for Test target
github "Quick/Nimble"
github "Quick/Quick"

2. Link Binaries with Libraries

  • Go to Test target build phase
  • Drag built frameworks from Carthage/Build
  • In rare case, we need to drag frameworks that the Main target uses
  • In rare case, we need to drag the Main target framework

3. Framework Search Paths

Configure correct path

  • Go to Test target Built Settings
  • Configure Framework Search Paths

4. Runpath Search Paths

  • Go to Test target Build Settings
  • Add $(FRAMEWORK_SEARCH_PATHS)

5. Copy Files (maybe)

From Adding frameworks to unit tests or a framework

In rare cases, you may want to also copy each dependency into the build product (e.g., to embed dependencies within the outer framework, or make sure dependencies are present in a test bundle). To do this, create a new “Copy Files” build phase with the “Frameworks” destination, then add the framework reference there as well.

Runpath Search Paths and Install name

Question

  • Why preconfigured run path "@executable_path/Frameworks" and "@loader_path/Frameworks" not work?
  • Why configuring runpath to "$(FRAMEWORK_SEARCH_PATHS)" works ?
  • Why framework has install name "@rpath/Sugar.framework/Sugar" ?

Reference

Author

Khoa Pham, [email protected]

License

TestTarget is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].