Wodel-Test for ATL

A mutation testing tool for ATL generated via Wodel-Test

View on GitHub Update-site Wodel project .zip ATL ecore Meta-model Standalone Eclipse+MuT for ATL

Here is a list of the identified ATL mutation operators useful for mutation testing:

Matched rule addition

deep clone one MatchedRule with {name = random-string(4, 6)}

Matched rule deletion

remove one MatchedRule

Matched rule name change

modify one MatchedRule with {name = random-string(4, 6)}

In pattern addition

cl = select one EClass from input resources
p = select one InPattern
mod = select one OclModel in p->elements->type->model
ipe = create SimpleInPatternElement in p->elements
  with {varName = random-string(2, 4)}
elem = create OclModelElement in ipe->type with
  {name = cl.name, variableDeclaration = ipe}
modify mod with {elements += elem}

In pattern element deletion

remove one InPatternElement

In pattern element class change

sipe = select one SimpleInPatternElement
type = select one OclModelElement in sipe->type
cl = select one EClass from input resources where {name <> type.name}
modify type with {name = cl.name}

NIn pattern element name change

modify one InPatternElement with {varName = random-string(4, 6)}

Filter addition

p = select one InPattern where {filter is typed OperatorCallExp}
opce = select one OperatorCallExp in p->filter
feat = select one OclFeature
sipe = select one SimpleInPatternElement in p->elements
conj = create OperatorCallExp in p->filter with {operationName = "and"}
call = create OperationCallExp in conj->^source
  with {operationName = feat.name}
exp = create VariableExp in call->^source
modify sipe with {variableExp += exp}
modify conj with {arguments += opce}
modify p with {filter += conj}

Filter deletion

remove one OclExpression where {container is typed InPattern}

Filter condition change

p = select all InPattern where {filter <> null}
opce = select one OperationCallExp in p->filter
  where {operationName <> ['not', 'and', 'or']}
feat = select one OclFeature where {name <> opce.operationName}
modify opce with {operationName = feat.name}

Out pattern element addition

cl = select one EClass from output resources
p = select one OutPattern
mod = select one OclModel in p->elements->type->model
ope = create SimpleOutPatternElement in p->elements
  with {varName = random-string(2, 4)}
elem = create OclModelElement in ope->type
  with {name = cl.name, variableDeclaration = ope}
modify mod with {elements += elem}

Out pattern element deletion

remove one OutPatternElement

Out pattern element class change

p = select one OutPattern
type = select one OclModelElement in p->elements->type
cl = select one EClass from output resources
  where {name <> type.name}
modify type with {name = cl.name}

Out pattern element name change

modify one OutPatternElement with {varName = random-string(4, 6)}

Binding addition

sope = select one SimpleOutPatternElement
type = select one OclModelElement in sope->type
cl = select one EClass from output resources
  where {name = type.name}
att = select one EAttribute in cl->eAllAttributes
b = create Binding in sope->bindings
  with {isAssignment = false, propertyName = att.name}
create StringExp in b->value
  with {stringSymbol = random-string(4, 6)}

Binding deletion

remove one Binding

Binding value change

b = select one Binding
  where {value is typed OperatorCallExp}
create StringExp in b->value
  with {stringSymbol = random-string(4, 6)}

Binding feature change

sope = select one SimpleOutPatternElement
type = select one OclModelElement in sope->type
cl = select one EClass from output resources where {name = type.name}
b = select one Binding in sope->bindings
att = select one EAttribute in cl->eAllAttributes
  where {name <> b.propertyName}
modify b with {propertyName = att.name}

This work has been funded by the Spanish Ministry of Science (RTI2018-095255-B-I00, project "MASSIVE") and the R&D programme of Madrid (P2018/TCS-4314, project "FORTE").