duanlisha2335 2018-06-12 15:17
浏览 111

使用Codeception和第三方REST API进行功能测试

I am using the functional tests of Codeception to test the routes of my REST application. In a few of my routes I use a third party REST API to get some data. To speak with this third party API I use a composer package published by the same party. Normally you would use a http mocker to fake the API calls to test it. The problem is that the domains are hardcoded in the composer package, so that I can't change them with a environment variable.

How could I go about testing my routes without using the real API calls?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 关于#python#的问题:自动化测试