Changeset 1150


Ignore:
Timestamp:
04/07/13 21:45:15 (12 years ago)
Author:
adeicke
Message:

Added usage patterns and mechanism for detecting them.

Location:
trunk/autoquest-core-usability-evaluation/src/main
Files:
16 added
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/UsabilityEvaluator.java

    r1138 r1150  
    6363    public UsabilityResult using(UsabilityRuleset ruleset) { 
    6464        Console.traceln(Level.INFO, "evaluating usability of task tree " + this.taskTree); 
     65        EvaluationMethodCaller evaluationMethodCaller = new EvaluationMethodCaller(); 
    6566        UsabilityResult result = new UsabilityResult(); 
    6667        for(UsabilityRule rule : ruleset.evaluationRules()) { 
    67             Optional<UsabilityDefect> defect = rule.check(); 
     68            Optional<UsabilityDefect> defect = rule.callEvaluationMethod(evaluationMethodCaller); 
    6869            if(defect.isPresent()) { 
    6970                result.addDefect(defect.get()); 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityMetric.java

    r1138 r1150  
    1515package de.ugoe.cs.autoquest.usability.rules; 
    1616 
     17import com.google.common.base.Optional; 
     18 
     19import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
     20 
    1721/** 
    1822 * <p> 
     
    2327 */ 
    2428public interface UsabilityMetric { 
     29     
     30    public Optional<UsabilityDefect> calculate(); 
    2531 
    2632} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/UsabilityRule.java

    r1138 r1150  
    1818 
    1919import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
     20import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2021import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
    2122 
     
    4546    } 
    4647     
    47     public abstract Optional<UsabilityDefect> check(); 
     48    public abstract Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller); 
    4849 
    4950} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/NoLetterOrDigitRatioMetric.java

    r1139 r1150  
    2727import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    2828import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     29import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2930import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
    3031import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
     
    6162     */ 
    6263    @Override 
    63     public Optional<UsabilityDefect> check() { 
     64    public Optional<UsabilityDefect> calculate() { 
    6465        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    6566        float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); 
     
    8889    } 
    8990 
     91    /* (non-Javadoc) 
     92     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 
     93     */ 
     94    @Override 
     95    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 
     96    { 
     97        return evaluationMethodCaller.check(this); 
     98    } 
     99 
    90100} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputEntryRepetitionsMetric.java

    r1139 r1150  
    2727import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    2828import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     29import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2930import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
    3031import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
     
    6162     */ 
    6263    @Override 
    63     public Optional<UsabilityDefect> check() { 
     64    public Optional<UsabilityDefect> calculate() { 
    6465        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    6566        float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter()); 
     
    103104    } 
    104105 
     106    /* (non-Javadoc) 
     107     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 
     108     */ 
     109    @Override 
     110    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 
     111    { 
     112        return evaluationMethodCaller.check(this); 
     113    } 
     114     
    105115} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/rules/metrics/TextInputRatioMetric.java

    r1139 r1150  
    2525import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTree; 
    2626import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
     27import de.ugoe.cs.autoquest.usability.EvaluationMethodCaller; 
    2728import de.ugoe.cs.autoquest.usability.result.DefectDescriptionResolver; 
    2829import de.ugoe.cs.autoquest.usability.result.UsabilityDefect; 
     
    5960     */ 
    6061    @Override 
    61     public Optional<UsabilityDefect> check() { 
     62    public Optional<UsabilityDefect> calculate() { 
    6263        FilterResult textInputEvents = extractNodesFromTaskTree(); 
    6364        float evaluationMetric = calculateEvaluationMetric(textInputEvents.nodesMatchedFilter(), textInputEvents.nodesNotMatchedFilter()); 
     
    8889    } 
    8990 
     91    /* (non-Javadoc) 
     92     * @see de.ugoe.cs.autoquest.usability.rules.UsabilityRule#callEvaluationMetho(de.ugoe.cs.autoquest.usability.EvaluationMethodCaller) 
     93     */ 
     94    @Override 
     95    public Optional<UsabilityDefect> callEvaluationMethod(EvaluationMethodCaller evaluationMethodCaller) 
     96    { 
     97        return evaluationMethodCaller.check(this); 
     98    } 
    9099} 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/EventTypeFilter.java

    r1135 r1150  
    2222import de.ugoe.cs.autoquest.eventcore.gui.IInteraction; 
    2323import de.ugoe.cs.autoquest.eventcore.gui.MouseButtonInteraction; 
     24import de.ugoe.cs.autoquest.eventcore.gui.MouseClick; 
    2425import de.ugoe.cs.autoquest.eventcore.gui.MouseInteraction; 
     26import de.ugoe.cs.autoquest.eventcore.gui.Scroll; 
    2527import de.ugoe.cs.autoquest.eventcore.gui.TextInput; 
    2628import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
     
    3840    MOUSE_BUTTON_INTERACTION(MouseButtonInteraction.class), 
    3941     
     42    MOUSE_CLICK(MouseClick.class), 
     43     
    4044    MOUSE_INTERACTION(MouseInteraction.class), 
    4145     
    4246    TEXT_INPUT(TextInput.class), 
     47     
     48    SCROLL(Scroll.class), 
    4349     
    4450    USER_INTERACTION(IInteraction.class); 
     
    4955        this.eventTypeClazz = eventTypeClazz; 
    5056    } 
    51  
     57     
    5258    @SuppressWarnings("unchecked") 
    5359    @Override 
  • trunk/autoquest-core-usability-evaluation/src/main/java/de/ugoe/cs/autoquest/usability/tasktree/filters/TaskTreeNodeTypeFilter.java

    r1137 r1150  
    1919 
    2020import de.ugoe.cs.autoquest.tasktrees.treeifc.IEventTask; 
     21import de.ugoe.cs.autoquest.tasktrees.treeifc.IIteration; 
     22import de.ugoe.cs.autoquest.tasktrees.treeifc.ISelection; 
     23import de.ugoe.cs.autoquest.tasktrees.treeifc.ISequence; 
    2124import de.ugoe.cs.autoquest.tasktrees.treeifc.ITaskTreeNode; 
    2225 
     
    3033public enum TaskTreeNodeTypeFilter implements TaskTreeNodeFilter<ITaskTreeNode> { 
    3134 
    32     EVENT_TASK_NODE(IEventTask.class); 
     35    EVENT_TASK_NODE(IEventTask.class), 
     36     
     37    ITERATION(IIteration.class), 
     38     
     39    SEQUENCE(ISequence.class), 
     40     
     41    SELECTION(ISelection.class),; 
    3342 
    3443    private Class<? extends ITaskTreeNode> nodeTypeClazz; 
     
    4756    @Override 
    4857    public Predicate filterPredicate() { 
    49         return Predicates.instanceOf(IEventTask.class); 
     58        return Predicates.instanceOf(nodeTypeClazz); 
    5059    } 
    5160 
  • trunk/autoquest-core-usability-evaluation/src/main/resources/defects.props

    r1134 r1150  
    3737severity.low = 0.5 
    3838severity.info = 0.3 
     39 
     40[LongFormUsageDefect] 
     41 
     42description = Long form detected. 
Note: See TracChangeset for help on using the changeset viewer.