Git Product home page Git Product logo

cwunit's Introduction

CwUnit

a UnitTesting Framework written in and for Clarion for Windows

License

Distributed under GPL 3.0

Road Map

  1. Initial Public Release
  2. Summarize Test Runs
  3. Interactive Test Runner
  4. Directory Watcher
  5. Improve Test Results
    1. Want results of each method call in the results
    2. Overall Pass/Fail will be the same

Concerns

  1. Hard coded paths in certain files
  2. Complexity relating to multiple result sets, but not taking advantage of it at this time.
  3. Possible incorrect of terms, such as TestFixture
  4. Inability to write a test for IsNull

Getting Started

  1. Clone the Repo
  2. Configure your clarion IDE to point to CWUnit 1. Tools.Options.Clarion.ClarionForWindows.Versions.Tab[Redirection File] 2. Click [Add], Macro=CwUnit, Value=C:....\CwUnit where the .... is where you cloned the repo
  3. Launch DbgView or DebugView++
  4. Compile the Solution ...\CwUnit\CwUnit.sln
    1. Observe test output in DebugView++
    2. This occurs as ExampleTest has a Post-build event that runs [..\CwUnit\CwUnit ExampleTest.DLL ]
  5. Create your own test DLL
    1. Configure the IDE
      1. Copy the .XPT and .XFT
        1. from "CwUnit\IDE Configuration\FileNew QuickStarts"
        2. to "%CWRoot%\bin\Addins\BackendBindings\ClarionBinding\ClaironWin\Templates"
        3. Relaunch the IDE so it notices the new files
    2. Create a new project, and use the Quick Start [CwUnit TestDLL]
      1. Ensure that your .RED will find CwUnit
        1. Either alter your base .RED or create a project specific one
        2. IDE.SolutionExplorer Highlight the .CwProj & MouseRight
          1. Create Redirection File in the project directory
          2. Add {include %CwUnit%\CwUnit.RED} to your .RED
      2. Compile
        1. You may wish to add configure your .cwproj to automatically run
    3. To add another module of tests to your project
      1. IDE.File.New.File
      2. Select [Create file inside project]
      3. Select QuickStart[CwUnit Test Member Module]
      4. Set The FileName of the module
      5. Click Create
      6. A few manual things - as described in the module
        1. Fix the member statement, fill in your global module
        2. Copy the Module & Prototype to the global map
        3. Copy the AddTests line to the MyTestSuite.Setup
  6. To run your tests: CwUnit Your.DLL
  7. For a Usage: CwUnit /?

Writing Tests

  1. Each test is a method that takes a single argument

    MyTests.IsTrue PROCEDURE(*CwUnit_ctResult Test)

  2. Each test needs to be added in AddTests method called from the main module
    MyTests.AddTest('IsTrue(1)' , ADDRESS(MyTests.SomeTest))

    MyTests.AddTest('IsTrue(0)' , ADDRESS(MyTests.IsTrue) , 0)

    MyTests.AddTest('IsTrue(2)' , ADDRESS(MyTests.IsTrue) , 2)

    Notice that you can add some data to be passed into the test PLEASE do NOT make one test dependent upon another test

Release Notes

CwUnit Initial Public Release - May 26th 2014

cwunit's People

Contributors

markgoldberg avatar

Stargazers

 avatar

Watchers

 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.