Ignore:
Timestamp:
04/11/14 11:21:45 (10 years ago)
Author:
pharms
Message:
  • state of the HCSE 2014 Paper. An appropriate tag will follow.
File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-test/src/test/java/de/ugoe/cs/autoquest/usability/RequiredInefficientActionsRuleTest.java

    r1335 r1493  
    1515package de.ugoe.cs.autoquest.usability; 
    1616 
    17 import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.SCROLL_REQUIRED; 
     17import static de.ugoe.cs.autoquest.usability.UsabilityDefectDescription.INEFFICIENT_ACTIONS; 
    1818import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.HIGH; 
    1919import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.INFO; 
     
    2121import static de.ugoe.cs.autoquest.usability.UsabilityDefectSeverity.MEDIUM; 
    2222 
     23import org.junit.Before; 
    2324import org.junit.Test; 
    2425 
     
    2829 * 
    2930 */ 
    30 public class RequiredScrollRuleTest extends AbstractUsabilityEvaluationTC { 
    31  
     31public class RequiredInefficientActionsRuleTest extends AbstractUsabilityEvaluationTC { 
     32 
     33    /** 
     34     * 
     35     */ 
     36    @Before 
     37    public void setUp() { 
     38        UsabilityDefectSeverity.defaultCoverageQuantile = 0; 
     39    } 
     40     
    3241    /** 
    3342     * 
     
    3544    @Test 
    3645    public void testWithNormalScroll_01() { 
    37         RequiredScrollRule rule = new RequiredScrollRule(); 
     46        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
    3847 
    3948        // ===== check ===== 
     
    5665    @Test 
    5766    public void testWithNormalScroll_02() { 
    58         RequiredScrollRule rule = new RequiredScrollRule(); 
     67        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
    5968 
    6069        // ===== check ===== 
     
    7988    @Test 
    8089    public void testWithNormalScroll_03() { 
    81         RequiredScrollRule rule = new RequiredScrollRule(); 
     90        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
    8291 
    8392        // ===== check ===== 
     
    91100         
    92101        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    93             { new UsabilityDefect(HIGH, SCROLL_REQUIRED) }; 
     102            { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 
    94103 
    95104        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     
    102111    @Test 
    103112    public void testWithNormalScroll_04() { 
    104         RequiredScrollRule rule = new RequiredScrollRule(); 
    105  
    106         // ===== check ===== 
    107         String spec = 
    108             "UserSession {" + 
    109             "  Sequence seq1 {" + 
    110             "    Scroll body {}" + 
    111             "    Interaction elem1 {}" + 
    112             "  }" + 
    113             "  Sequence seq1 {" + 
    114             "    Scroll body {}" + 
    115             "    Interaction elem1 {}" + 
    116             "  }" + 
    117             "}"; 
    118          
    119         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    120             { new UsabilityDefect(HIGH, SCROLL_REQUIRED) }; 
    121  
    122         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
    123  
    124     } 
    125  
    126     /** 
    127      * 
    128      */ 
    129     @Test 
    130     public void testOnlySeldomPreceededByScroll_01() { 
    131         RequiredScrollRule rule = new RequiredScrollRule(); 
    132  
    133         // ===== check ===== 
    134         String spec = 
    135             "UserSession {" + 
    136             "  Sequence seq1 {" + 
    137             "    Interaction elem1 {}" + 
    138             "    Interaction elem1 {}" + 
    139             "    Interaction elem1 {}" + 
    140             "    Scroll body {}" + 
     113        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     114 
     115        // ===== check ===== 
     116        String spec = 
     117            "UserSession {" + 
     118            "  Sequence {" + 
     119            "    Interaction elem1 {}" + 
     120            "    Scroll body {}" + 
     121            "  }" + 
     122            "}"; 
     123         
     124        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     125            { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 
     126 
     127        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     128 
     129    } 
     130 
     131    /** 
     132     * 
     133     */ 
     134    @Test 
     135    public void testWithNormalScroll_05() { 
     136        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     137 
     138        // ===== check ===== 
     139        String spec = 
     140            "UserSession {" + 
     141            "  Sequence seq1 {" + 
     142            "    Scroll body {}" + 
     143            "    Interaction elem1 {}" + 
     144            "  }" + 
     145            "  Sequence seq1 {" + 
     146            "    Scroll body {}" + 
     147            "    Interaction elem1 {}" + 
     148            "  }" + 
     149            "}"; 
     150         
     151        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     152            { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 
     153 
     154        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     155 
     156    } 
     157 
     158    /** 
     159     * 
     160     */ 
     161    @Test 
     162    public void testWithNormalScroll_06() { 
     163        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     164 
     165        // ===== check ===== 
     166        String spec = 
     167            "UserSession {" + 
     168            "  Sequence seq1 {" + 
     169            "    Interaction elem1 {}" + 
     170            "    Scroll body {}" + 
     171            "  }" + 
     172            "  Sequence seq1 {" + 
     173            "    Interaction elem1 {}" + 
     174            "    Scroll body {}" + 
     175            "  }" + 
     176            "}"; 
     177         
     178        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     179            { new UsabilityDefect(HIGH, INEFFICIENT_ACTIONS) }; 
     180 
     181        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     182 
     183    } 
     184 
     185    /** 
     186     * 
     187     */ 
     188    @Test 
     189    public void testScrollSeldomRequired_01() { 
     190        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     191 
     192        // ===== check ===== 
     193        String spec = 
     194            "UserSession {" + 
     195            "  Sequence seq1 {" + 
     196            "    Interaction elem1 {}" + 
     197            "    Interaction elem1 {}" + 
     198            "    Interaction elem1 {}" + 
     199            "    Scroll body {}" + 
     200            "    Interaction elem1 {}" + 
     201            "  }" + 
     202            "}"; 
     203         
     204        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     205            { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 
     206 
     207        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     208 
     209    } 
     210 
     211    /** 
     212     * 
     213     */ 
     214    @Test 
     215    public void testScrollSeldomRequired_02() { 
     216        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     217 
     218        // ===== check ===== 
     219        String spec = 
     220            "UserSession {" + 
     221            "  Sequence seq1 {" + 
     222            "    Optional opt1 { }" + 
     223            "    Interaction elem1 {}" + 
     224            "  }" + 
     225            "  Sequence seq1 {" + 
     226            "    Optional opt1 {" + 
     227            "      Scroll body {}" + 
     228            "    }" + 
     229            "    Interaction elem1 {}" + 
     230            "  }" + 
     231            "  Sequence seq1 {" + 
     232            "    Optional opt1 {" + 
     233            "      Scroll body {}" + 
     234            "    }" + 
     235            "    Interaction elem1 {}" + 
     236            "  }" + 
     237            "}"; 
     238         
     239        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     240            { new UsabilityDefect(MEDIUM, INEFFICIENT_ACTIONS) }; 
     241 
     242        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     243 
     244    } 
     245 
     246    /** 
     247     * 
     248     */ 
     249    @Test 
     250    public void testScrollSeldomRequired_03() { 
     251        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     252 
     253        // ===== check ===== 
     254        String spec = 
     255            "UserSession {" + 
     256            "  Sequence seq1 {" + 
     257            "    Interaction elem1 {}" + 
     258            "    Optional opt1 { }" + 
     259            "  }" + 
     260            "  Sequence seq1 {" + 
     261            "    Interaction elem1 {}" + 
     262            "    Optional opt1 {" + 
     263            "      Scroll body {}" + 
     264            "    }" + 
     265            "  }" + 
     266            "  Sequence seq1 {" + 
     267            "    Interaction elem1 {}" + 
     268            "    Optional opt1 {" + 
     269            "      Scroll body {}" + 
     270            "    }" + 
     271            "  }" + 
     272            "}"; 
     273         
     274        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     275            { new UsabilityDefect(MEDIUM, INEFFICIENT_ACTIONS) }; 
     276 
     277        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     278 
     279    } 
     280 
     281    /** 
     282     * 
     283     */ 
     284    @Test 
     285    public void testScrollSeldomRequired_04() { 
     286        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     287 
     288        // ===== check ===== 
     289        String spec = 
     290            "UserSession {" + 
     291            "  Sequence seq1 {" + 
     292            "    Optional opt1 { }" + 
     293            "    Interaction elem1 {}" + 
     294            "  }" + 
     295            "  Sequence seq1 {" + 
     296            "    Optional opt1 {}" + 
     297            "    Interaction elem1 {}" + 
     298            "  }" + 
     299            "  Sequence seq1 {" + 
     300            "    Optional opt1 {" + 
     301            "      Scroll body {}" + 
     302            "    }" + 
     303            "    Interaction elem1 {}" + 
     304            "  }" + 
     305            "  Sequence seq1 {" + 
     306            "    Optional opt1 {" + 
     307            "      Scroll body {}" + 
     308            "    }" + 
     309            "    Interaction elem1 {}" + 
     310            "  }" + 
     311            "}"; 
     312         
     313        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     314           { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 
     315 
     316        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     317 
     318    } 
     319 
     320    /** 
     321     * 
     322     */ 
     323    @Test 
     324    public void testScrollSeldomRequired_05() { 
     325        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     326 
     327        // ===== check ===== 
     328        String spec = 
     329            "UserSession {" + 
     330            "  Sequence seq1 {" + 
     331            "    Interaction elem1 {}" + 
     332            "    Optional opt1 { }" + 
     333            "  }" + 
     334            "  Sequence seq1 {" + 
     335            "    Interaction elem1 {}" + 
     336            "    Optional opt1 {}" + 
     337            "  }" + 
     338            "  Sequence seq1 {" + 
     339            "    Interaction elem1 {}" + 
     340            "    Optional opt1 {" + 
     341            "      Scroll body {}" + 
     342            "    }" + 
     343            "  }" + 
     344            "  Sequence seq1 {" + 
     345            "    Interaction elem1 {}" + 
     346            "    Optional opt1 {" + 
     347            "      Scroll body {}" + 
     348            "    }" + 
     349            "  }" + 
     350            "}"; 
     351         
     352        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     353           { new UsabilityDefect(LOW, INEFFICIENT_ACTIONS) }; 
     354 
     355        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     356 
     357    } 
     358 
     359    /** 
     360     * 
     361     */ 
     362    @Test 
     363    public void testScrollSeldomRequired_06() { 
     364        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     365 
     366        // ===== check ===== 
     367        String spec = 
     368            "UserSession {" + 
     369            "  Sequence seq1 {" + 
     370            "    Optional opt1 { }" + 
     371            "    Interaction elem1 {}" + 
     372            "  }" + 
     373            "  Sequence seq1 {" + 
     374            "    Optional opt1 { }" + 
     375            "    Interaction elem1 {}" + 
     376            "  }" + 
     377            "  Sequence seq1 {" + 
     378            "    Optional opt1 { }" + 
     379            "    Interaction elem1 {}" + 
     380            "  }" + 
     381            "  Sequence seq1 {" + 
     382            "    Optional opt1 {" + 
     383            "      Scroll body {}" + 
     384            "    }" + 
     385            "    Interaction elem1 {}" + 
     386            "  }" + 
     387            "}"; 
     388         
     389        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     390            { new UsabilityDefect(INFO, INEFFICIENT_ACTIONS) }; 
     391 
     392        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     393 
     394    } 
     395 
     396    /** 
     397     * 
     398     */ 
     399    @Test 
     400    public void testScrollSeldomRequired_07() { 
     401        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     402 
     403        // ===== check ===== 
     404        String spec = 
     405            "UserSession {" + 
     406            "  Sequence seq1 {" + 
     407            "    Interaction elem1 {}" + 
     408            "    Optional opt1 { }" + 
     409            "  }" + 
     410            "  Sequence seq1 {" + 
     411            "    Interaction elem1 {}" + 
     412            "    Optional opt1 { }" + 
     413            "  }" + 
     414            "  Sequence seq1 {" + 
     415            "    Interaction elem1 {}" + 
     416            "    Optional opt1 { }" + 
     417            "  }" + 
     418            "  Sequence seq1 {" + 
     419            "    Interaction elem1 {}" + 
     420            "    Optional opt1 {" + 
     421            "      Scroll body {}" + 
     422            "    }" + 
     423            "  }" + 
     424            "}"; 
     425         
     426        UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
     427            { new UsabilityDefect(INFO, INEFFICIENT_ACTIONS) }; 
     428 
     429        assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
     430 
     431    } 
     432 
     433    /** 
     434     * 
     435     */ 
     436    @Test 
     437    public void testScrollSeldomRequired_08() { 
     438        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     439 
     440        // ===== check ===== 
     441        String spec = 
     442            "UserSession {" + 
     443            "  Sequence seq1 {" + 
     444            "    Optional opt1 { }" + 
     445            "    Interaction elem1 {}" + 
     446            "  }" + 
     447            "  Sequence seq1 {" + 
     448            "    Optional opt1 { }" + 
     449            "    Interaction elem1 {}" + 
     450            "  }" + 
     451            "  Sequence seq1 {" + 
     452            "    Optional opt1 { }" + 
     453            "    Interaction elem1 {}" + 
     454            "  }" + 
     455            "  Sequence seq1 {" + 
     456            "    Optional opt1 {" + 
     457            "      Scroll body {}" + 
     458            "    }" + 
     459            "    Interaction elem1 {}" + 
     460            "  }" + 
     461            "  Sequence seq1 {" + 
     462            "    Optional opt1 { }" + 
     463            "    Interaction elem1 {}" + 
     464            "  }" + 
     465            "  Sequence seq1 {" + 
     466            "    Optional opt1 { }" + 
     467            "    Interaction elem1 {}" + 
     468            "  }" + 
     469            "  Sequence seq1 {" + 
     470            "    Optional opt1 { }" + 
     471            "    Interaction elem1 {}" + 
     472            "  }" + 
     473            "  Sequence seq1 {" + 
     474            "    Optional opt1 { }" + 
    141475            "    Interaction elem1 {}" + 
    142476            "  }" + 
     
    153487     */ 
    154488    @Test 
    155     public void testOnlySeldomPreceededByScroll_02() { 
    156         RequiredScrollRule rule = new RequiredScrollRule(); 
    157  
    158         // ===== check ===== 
    159         String spec = 
    160             "UserSession {" + 
    161             "  Sequence seq1 {" + 
    162             "    Optional opt1 { }" + 
    163             "    Interaction elem1 {}" + 
    164             "  }" + 
    165             "  Sequence seq1 {" + 
    166             "    Optional opt1 {" + 
    167             "      Scroll body {}" + 
    168             "    }" + 
    169             "    Interaction elem1 {}" + 
    170             "  }" + 
    171             "  Sequence seq1 {" + 
    172             "    Optional opt1 {" + 
    173             "      Scroll body {}" + 
    174             "    }" + 
    175             "    Interaction elem1 {}" + 
    176             "  }" + 
    177             "}"; 
    178          
    179         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    180             { new UsabilityDefect(MEDIUM, SCROLL_REQUIRED) }; 
    181  
    182         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
    183  
    184     } 
    185  
    186     /** 
    187      * 
    188      */ 
    189     @Test 
    190     public void testOnlySeldomPreceededByScroll_03() { 
    191         RequiredScrollRule rule = new RequiredScrollRule(); 
    192  
    193         // ===== check ===== 
    194         String spec = 
    195             "UserSession {" + 
    196             "  Sequence seq1 {" + 
    197             "    Optional opt1 { }" + 
    198             "    Interaction elem1 {}" + 
    199             "  }" + 
    200             "  Sequence seq1 {" + 
    201             "    Optional opt1 {}" + 
    202             "    Interaction elem1 {}" + 
    203             "  }" + 
    204             "  Sequence seq1 {" + 
    205             "    Optional opt1 {" + 
    206             "      Scroll body {}" + 
    207             "    }" + 
    208             "    Interaction elem1 {}" + 
    209             "  }" + 
    210             "  Sequence seq1 {" + 
    211             "    Optional opt1 {" + 
    212             "      Scroll body {}" + 
    213             "    }" + 
    214             "    Interaction elem1 {}" + 
    215             "  }" + 
    216             "}"; 
    217          
    218         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    219            { new UsabilityDefect(LOW, SCROLL_REQUIRED) }; 
    220  
    221         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
    222  
    223     } 
    224  
    225     /** 
    226      * 
    227      */ 
    228     @Test 
    229     public void testOnlySeldomPreceededByScroll_04() { 
    230         RequiredScrollRule rule = new RequiredScrollRule(); 
    231  
    232         // ===== check ===== 
    233         String spec = 
    234             "UserSession {" + 
    235             "  Sequence seq1 {" + 
    236             "    Optional opt1 { }" + 
    237             "    Interaction elem1 {}" + 
    238             "  }" + 
    239             "  Sequence seq1 {" + 
    240             "    Optional opt1 { }" + 
    241             "    Interaction elem1 {}" + 
    242             "  }" + 
    243             "  Sequence seq1 {" + 
    244             "    Optional opt1 { }" + 
    245             "    Interaction elem1 {}" + 
    246             "  }" + 
    247             "  Sequence seq1 {" + 
    248             "    Optional opt1 {" + 
    249             "      Scroll body {}" + 
    250             "    }" + 
    251             "    Interaction elem1 {}" + 
    252             "  }" + 
    253             "}"; 
    254          
    255         UsabilityDefect[] expectedDefects = new UsabilityDefect[] 
    256             { new UsabilityDefect(INFO, SCROLL_REQUIRED) }; 
    257  
    258         assertUsabilityEvaluationResult(expectedDefects, rule.evaluate(createTaskModel(spec))); 
    259  
    260     } 
    261  
    262     /** 
    263      * 
    264      */ 
    265     @Test 
    266     public void testOnlySeldomPreceededByScroll_05() { 
    267         RequiredScrollRule rule = new RequiredScrollRule(); 
    268  
    269         // ===== check ===== 
    270         String spec = 
    271             "UserSession {" + 
    272             "  Sequence seq1 {" + 
    273             "    Optional opt1 { }" + 
    274             "    Interaction elem1 {}" + 
    275             "  }" + 
    276             "  Sequence seq1 {" + 
    277             "    Optional opt1 { }" + 
    278             "    Interaction elem1 {}" + 
    279             "  }" + 
    280             "  Sequence seq1 {" + 
    281             "    Optional opt1 { }" + 
    282             "    Interaction elem1 {}" + 
    283             "  }" + 
    284             "  Sequence seq1 {" + 
    285             "    Optional opt1 {" + 
    286             "      Scroll body {}" + 
    287             "    }" + 
    288             "    Interaction elem1 {}" + 
    289             "  }" + 
    290             "  Sequence seq1 {" + 
    291             "    Optional opt1 { }" + 
    292             "    Interaction elem1 {}" + 
    293             "  }" + 
    294             "  Sequence seq1 {" + 
    295             "    Optional opt1 { }" + 
    296             "    Interaction elem1 {}" + 
    297             "  }" + 
    298             "  Sequence seq1 {" + 
    299             "    Optional opt1 { }" + 
    300             "    Interaction elem1 {}" + 
    301             "  }" + 
    302             "  Sequence seq1 {" + 
    303             "    Optional opt1 { }" + 
    304             "    Interaction elem1 {}" + 
     489    public void testScrollSeldomRequired_09() { 
     490        RequiredInefficientActionsRule rule = new RequiredInefficientActionsRule(); 
     491 
     492        // ===== check ===== 
     493        String spec = 
     494            "UserSession {" + 
     495            "  Sequence seq1 {" + 
     496            "    Interaction elem1 {}" + 
     497            "    Optional opt1 { }" + 
     498            "  }" + 
     499            "  Sequence seq1 {" + 
     500            "    Interaction elem1 {}" + 
     501            "    Optional opt1 { }" + 
     502            "  }" + 
     503            "  Sequence seq1 {" + 
     504            "    Interaction elem1 {}" + 
     505            "    Optional opt1 { }" + 
     506            "  }" + 
     507            "  Sequence seq1 {" + 
     508            "    Interaction elem1 {}" + 
     509            "    Optional opt1 {" + 
     510            "      Scroll body {}" + 
     511            "    }" + 
     512            "  }" + 
     513            "  Sequence seq1 {" + 
     514            "    Interaction elem1 {}" + 
     515            "    Optional opt1 { }" + 
     516            "  }" + 
     517            "  Sequence seq1 {" + 
     518            "    Interaction elem1 {}" + 
     519            "    Optional opt1 { }" + 
     520            "  }" + 
     521            "  Sequence seq1 {" + 
     522            "    Interaction elem1 {}" + 
     523            "    Optional opt1 { }" + 
     524            "  }" + 
     525            "  Sequence seq1 {" + 
     526            "    Interaction elem1 {}" + 
     527            "    Optional opt1 { }" + 
    305528            "  }" + 
    306529            "}"; 
Note: See TracChangeset for help on using the changeset viewer.