Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create an automated testing framework #2

Open
tobin opened this issue Jul 31, 2014 · 1 comment
Open

Create an automated testing framework #2

tobin opened this issue Jul 31, 2014 · 1 comment

Comments

@tobin
Copy link
Owner

tobin commented Jul 31, 2014

No description provided.

@nicolassmith
Copy link

You might want to look at https://github.com/Optickle/Optickle/blob/Optickle2/tests/testClasses/OptickleReferenceTest.m and https://github.com/Optickle/Optickle/blob/Optickle2/tests/testClasses/TickleTestOnOpt.m

It can compare the output of either two current installations of Optickle, or compare the current installation with some saved output created at an earlier time.

It decides what to do based on the config structure. If config.referenceType is 'Files' then config.referencePath points to a directory where the reference files are saved.

>> addpath(genpath('~/repos/Optickle'))
>> foo = TickleTestOnOpt(@optFP)       

foo = 

  TickleTestOnOpt with properties:

         optFuncHandle: @optFP
    testFunctionHandle: @()computeResults(testCase)
       referenceStruct: []
      calculatedStruct: []
             testLabel: 'TickleTestOnOpt(@optFP)'
                config: [1x1 struct]

>> foo.config.referencePath = pwd;     
>> foo.saveTestFunctionOutputToReference();
>> ls
TickleTestOnOpt(@optFP).mat  TickleTestOnOpt(@optFP).txt

>> foo.run()
Running TickleTestOnOpt
---===Optickle Test===---
Reference type is Files
Reference path is /home/nicolas/tmp/poop
Optickle path is ~/repos/Optickle
......
Done TickleTestOnOpt
__________


ans = 

  1x6 TestResult array with properties:

    Name
    Passed
    Failed
    Incomplete
    Duration

Totals:
   6 Passed, 0 Failed, 0 Incomplete.
   0.82422 seconds testing time.

>> 

Can tell you more about it if you'd like.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants