Quick + Nimble Unit test

Source: Internet
Author: User

The first is how to integrate these 2 frameworks into a project.

I use Swift as a development language for projects.

First create a swift project and then integrate it into the project with Cocoapod, podfile the file contents refer to GitHub----> https://github.com/Quick/Quick#

Here is an example

use_frameworks!def testing_podspod'Quick','~> 0.8.0'pod'Nimble','3.0.0'End//swiftquicktesttests the test unit in the project, it is simple to create a project tick "Unit Tests"/"UI Tests", then you will generate 2 folders on the left side//test units in the Swiftquicktestuitests projectTarget'swiftquicktesttests'  Dotesting_pods Endtarget'swiftquicktestuitests'  DoTesting_pods End

2 frames downloaded to local, followed by the Main.h file containing the 2 frames (quick.h/nimble.h)

Create a swift and OC bridging file, similar to "Swiftquicktesttests-bridging-header" like "Projectname-bridging-header" contains the following code,

If you create an OC file, you will be prompted to create a message for the file, and you can click created to automatically create a file like the one above.

Why create an OC file, because these 2 frames are still written in OC, Swift cannot call the OC code directly, and it needs to be referenced before it can be called

#import <Quick/Quick.h>#import <Nimble/Nimble.h>

The basic thing is to include 2 frames in the unit test, specifically what is the project of each unit module to do

Quick + Nimble Unit test

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.