Code Monkey home page Code Monkey logo

mbed-http-integration-test's Introduction

Mbed OS Integration Test example

This is an example application that contains simple integration tests that can be ran with Greentea. It also contains a host runner example that runs on the computer, and can be used to communicate back and forth from the device. More information can be found in the Testing tools section in the Mbed OS documentation.

Here's a video.

Which tests

There are two tests included:

  • simple-test - bare minimum Greentea test.
  • toilet-test - test for the Mbed HTTP library that sends data to the cloud. A host test is included to verify that the right data was sent.

How to run

  1. Clone this repository via Mbed CLI:

    $ mbed import https://os.mbed.com/teams/sandbox/code/mbed-http-integration-test/
    
  2. Set your target:

    $ mbed target auto
    
  3. Set your compiler toolchain:

    $ mbed toolchain GCC_ARM
    
  4. If you're using WiFi, set your credentials in mbed_app.json.

  5. If you're not using the built-in network adapter, add the driver, and then select the driver in TESTS/tests/toilet-test/main.cpp. For more information see IP Networking in the Mbed OS documentation.

  6. Run the tests:

    $ mbed test -v -n tests-tests-*
    
  7. Example output:

    mbedgt: test case report:
    +--------------+---------------+-------------------------+--------------+--------+--------+--------+--------------------+
    | target       | platform_name | test suite              | test case    | passed | failed | result | elapsed_time (sec) |
    +--------------+---------------+-------------------------+--------------+--------+--------+--------+--------------------+
    | K64F-GCC_ARM | K64F          | tests-tests-simple-test | simple test  | 1      | 0      | OK     | 0.0                |
    | K64F-GCC_ARM | K64F          | tests-tests-toilet-test | dump message | 1      | 0      | OK     | 10.77              |
    +--------------+---------------+-------------------------+--------------+--------+--------+--------+--------------------+
    mbedgt: test case results: 2 OK
    mbedgt: completed in 52.50 sec
    

mbed-http-integration-test's People

Contributors

janjongboom avatar

Watchers

 avatar James Cloos avatar  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.