Code Monkey home page Code Monkey logo

unit-testing-framework's Introduction

Unit Testing Framework

A tool for automating test suites for Roku channels.

Scope

The following framework allows developers to run unit tests and collect channel errors.

Current Implementation

Current implementation consists of Test Runner which collects all test cases and run them one by one, Base Test Suite contains assertion methods and Item Generator which allows to create different objects by given scheme.

Overview

The Test Runner collects all test suites with their test cases under the given directory. When all test cases are collected, the Test Runner runs them one by one and collects the results. After running all the test cases Test Runner outputs the statistic log with selected level of verbosity.

Every test suite must extend BaseTestSuite and must contain at least one test case.

  • For the full instructions, please refer to the Instructions
  • Please send pull requests and feedback to us in this repo.

Annotation approach

This is a project to show new approach in building unit tests functions.

It's based on JUnit 5 annotations approach

See JUnit guide

For now we support

  • @Test - describes this is a test
  • @BeforeAll - function to run before all functions
  • @BeforeEach - function to run before each test execution
  • @AfterAll - function that will run after all tests in test suite
  • @AfterEach - function that will run after each test
  • @RepeatedTest(n) - repeats test for n times
  • @ParameterizedTest and @MethodSource("argsProviderFunctionName") - parametrized tests
  • @Ignore - function that wont be run as test

Local build and run

  • clone project and cd to it.
  • build a framework, by using: ./build.sh or build.bat
  • import built framework to any sample you want (please use samples directory)
  • run import_unit_test_framework.bat or ./import_unit_test_framework.sh or place the UnitTestFramework.brs file to the testFramework folder manually.
  • please use README.MD from samples directory.

Thanks for building on the Roku Platform!

unit-testing-framework's People

Contributors

rokurnd avatar tcharles411 avatar chris-trag avatar rokudevtools avatar dannykng avatar yurii-polishchuk avatar

Watchers

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