RFD-FHEM / RFFHEM

Counterpart of SIGNALDuino, it's the code for FHEM to work with the data received from the uC
GNU General Public License v3.0
44 stars 33 forks source link

Tool for testing FHEM commands against devices #1121

Closed sidey79 closed 1 year ago

sidey79 commented 1 year ago

Adds test features for commands like set, get, attr

Testing set, get or attr commands needs much time, because there is no tool available.

A tool is proved, to save time in writing tests

no

    {   
        targetName      =>  q[SD_UT_Test_1],
    testname        =>  q[set command light_on],
        cmd             =>  q[set light_on],

        returnCheck     => F(),    
        subCheck        => hash { field 'IOWrite' => array { item 0 => hash { field 'args' => array { item hash { etc(); } ; item 'sendMsg'; item 'P20#00111110000000000001111000011001#R5' }; etc() } } } ,
    }
codecov[bot] commented 1 year ago

Codecov Report

Merging #1121 (4d32530) into master_RCnoName20_10 (651a44f) will increase coverage by 0.42%. The diff coverage is 61.33%.

@@                   Coverage Diff                    @@
##           master_RCnoName20_10    #1121      +/-   ##
========================================================
+ Coverage                 64.80%   65.23%   +0.42%     
========================================================
  Files                       132      136       +4     
  Lines                      9715     9820     +105     
  Branches                   1547     1556       +9     
========================================================
+ Hits                       6296     6406     +110     
+ Misses                     2202     2175      -27     
- Partials                   1217     1239      +22     
Flag Coverage Δ
fhem 57.37% <61.33%> (+0.60%) :arrow_up:
modules 65.23% <61.33%> (+0.42%) :arrow_up:
perl 90.37% <ø> (ø)
unittests 65.23% <61.33%> (+0.42%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
lib/Test2/SIGNALduino/FHEM_Command.pm 54.83% <54.83%> (ø)
t/FHEM/14_SD_UT/03_set.t 92.30% <92.30%> (ø)
t/FHEM/14_SD_WS09/00_load.t 100.00% <0.00%> (ø)
t/FHEM/14_BresserTemeo/09_parseDatat.t 80.00% <0.00%> (ø)
FHEM/14_SD_UT.pm 44.29% <0.00%> (+4.16%) :arrow_up:

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more