Giter VIP home page Giter VIP logo

mvvm_rac_02_unittest's Introduction

RACUnitTest

在ReactiveCocoa中登录情景抓取网络数据并显示情景使用kiwi进行单元测试案例

Moco模拟服务

Moco是一个可以轻松搭建测试服务器的工具。

###安装 如果你是使用Mac或Linux,可以尝试一下步骤:

  1. 确定你安装JDK 6以上
  2. 下载脚本
  3. 把它放在你的**$PATH**路径
  4. 设置它可以执行(chmod 755 ~/bin/moco)

现在你可以运行一下命令测试安装是否成功

  1. 编写配置文件foo.json,内容如下:
[
     {
       "response" :
         {
           "text" : "Hello, Moco"
         }
     }
]
  1. 运行Moco HTTP服务器 moco start -p 12306 -c foo.json

  2. 打开浏览器访问http://localhost:12306,你回看见"Hello, Moco"

###配置IP 由于这里使用的是本地服务,所以很有可能需要修改本地IP地址,先找到本机的IP。

然在URLHelper类中修改BaseURL的IP字段。

###启动服务 将路径跳转到RACUnitTest/RACUnitTest/JSON目录,找到settings.json文件,使用命令行来启动服务: moco start -p 12306 -g settings.json

###使用Paw验证是否配置成功 Send request to Local Server.png

###运行测试

mvvm_rac_02_unittest's People

Contributors

samlaudev avatar

Watchers

Harold Bierlein avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.