Distributed under GPL 3.0
- Initial Public Release
- Summarize Test Runs
- Interactive Test Runner
- Directory Watcher
- Improve Test Results
- Want results of each method call in the results
- Overall Pass/Fail will be the same
- Hard coded paths in certain files
- Complexity relating to multiple result sets, but not taking advantage of it at this time.
- Possible incorrect of terms, such as TestFixture
- Inability to write a test for IsNull
- Clone the Repo
- 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
- Launch DbgView or DebugView++
- Compile the Solution ...\CwUnit\CwUnit.sln
- Observe test output in DebugView++
- This occurs as ExampleTest has a Post-build event that runs [..\CwUnit\CwUnit ExampleTest.DLL ]
- Create your own test DLL
- Configure the IDE
- Copy the .XPT and .XFT
- from "CwUnit\IDE Configuration\FileNew QuickStarts"
- to "%CWRoot%\bin\Addins\BackendBindings\ClarionBinding\ClaironWin\Templates"
- Relaunch the IDE so it notices the new files
- Copy the .XPT and .XFT
- Create a new project, and use the Quick Start [CwUnit TestDLL]
- Ensure that your .RED will find CwUnit
- Either alter your base .RED or create a project specific one
- IDE.SolutionExplorer Highlight the .CwProj & MouseRight
- Create Redirection File in the project directory
- Add {include %CwUnit%\CwUnit.RED} to your .RED
- Compile
- You may wish to add configure your .cwproj to automatically run
- Ensure that your .RED will find CwUnit
- To add another module of tests to your project
- IDE.File.New.File
- Select [Create file inside project]
- Select QuickStart[CwUnit Test Member Module]
- Set The FileName of the module
- Click Create
- A few manual things - as described in the module
- Fix the member statement, fill in your global module
- Copy the Module & Prototype to the global map
- Copy the AddTests line to the MyTestSuite.Setup
- Configure the IDE
- To run your tests: CwUnit Your.DLL
- For a Usage: CwUnit /?
-
Each test is a method that takes a single argument
MyTests.IsTrue PROCEDURE(*CwUnit_ctResult Test)
-
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