-
Notifications
You must be signed in to change notification settings - Fork 2
Properties files
#Properties files
muJava++ works with .properties files that contains all arguments to be used. Since there is so many optional arguments that can be set, having a file holding all of them instead of having to write all of them in the console is very convenient, and allows to have several experiments defined each on its own .properties file.
##Supported properties
-
path.original.source= [PATH] : the path to the source files of the program you want to use to generate mutants, for example src/
-
path.original.bin= [PATH] : the path to the class files of the program you want to use to generate mutants, for example bin/
-
path.tests.bin= [PATH] : the path to the class files of the JUnit tests you want to use, for example bin/
-
path.mutants= [PATH] : the path where the mutants will be saved, for example mutants/
-
mutation.basic.class= [QUALIFIED CLASS NAME] : this defines the class to be mutated. Only one class can be defined.
-
mutation.basic.methods= [METHOD( METHOD)*] : this defines the method/s that muJava++ will mutate.
-
mutation.basic.operators= [OPERATOR( OPERATOR)*] : this defines the mutation operators used by muJava++. To see which operators are supported and what each one do, you can call mujava.app.Console with --args -h. Other option is to look at this file.
-
mutation.advanced.bannedMethods= [METHOD( METHOD)*] : optional argument to define which methods PRVO mutation operators will not use. For example, when mutation an expression a.b.c and b can be changed with method m, this mutation will not be generated if m was declared in this argument.
-
mutation.advanced.bannedFields= [FIELD( FIELD)*] : same as mutation.advanced.bannedMethods but for fields.
-
mutation.advanced.ignoreMutGenLimit= [BOOLEAN] : muJava++ uses //mutGenLimit k comments to define which statements are allowed to be mutated. This optional argument allows to define if muJava++ will only mutate annotated lines or it will ignore all mutGenLimit k comments making all statements mutable.
-
mutation.advanced.allowFieldMutations= [BOOLEAN] : some mutation operators can be applied both inside methods and class fields. This optional argument allows to define if those operators will be applied on both methods and fields or just methods.
-
mutation.advanced.allowClassMutations= [BOOLEAN] : some mutation operators can be applied both inside methods and the class declaration. This optional argument allows to define if those operators will be applied on both methods and class declaration or just methods.
-
mutation.basic.mutationScore= [BOOLEAN] : this defines if mutation score will be calculated after generating mutants.
-
mutation.advanced.quickDeath= [BOOLEAN] : when set to true, this argument will make that while running mutation score, if a test fails with a given mutant, then all other tests will not be executed with that mutant. The default value is false.
-
mutation.basic.tests= [QUALIFIED CLASS NAMES] : the test classes you want to run, using fully qualified names like a.b.C and separated by a space when you want to run more than one JUnit test class.
-
mutation.advanced.allowedPackagesToReload=[PACKAGES] : this is an optional argument that is used to improve the performance, since only one VM is used, mutated classes must be reloaded during runtime. But to properly link the reloaded mutated class, all related classes must also be reloaded. This argument tells the reloader to only reload classes inside the given packages. For example, in the given example, all classes involved are inside the utils and mutationScore, if you wanted to add a myPackage.foo package with another example, the reloader will reload all classes inside the test/ folder each time tests are ran. To avoid this, you could put ** utils mutationScore** in this argument and the reloader would only reload the classes in that package. The default value is to allow all packages by not defining any value.
-
mutation.advanced.fullVerbose= [BOOLEAN] : this is an optional argument that is used to define how much verbosity muJava++ will use. The default value is false.
-
mutation.advanced.generations= [POSITIVE NUMBER] : this is an optional argument that is used to define how many generations muJava++ will generate. If mutation score is enabled then it will be calculated using the last generation. The default value is 1.
-
mutation.basic.showSurvivingMutants= [BOOLEAN] : this is an optional argument that defines if (when set to true) surviving mutants, those who compile and pass all tests, will be listed at the end of the mutation score process. The default value is false.
-
mutation.advanced.ReloaderCleanLimit= [POSITIVE NUMBER] : this option allows to define how many Reloader instances will be created before doing a cleanup, with a value of 50 there will be a max of 50 instances before executing a cleaning process that will free up most of those instances. Default value is 150. This option is only useful when running mutation score.
-
mutation.advanced.toughness= [BOOLEAN] : Enable/disable toughness analysis. This analysis is done for each mutant by the formula
1 - (failing tests / total tests)and an average toughness calculated by the sum of each mutant toughness value divided the total of mutants. Notice that if toughness analysis is enabled then quick death is disabled. This options is disabled by default. -
mutation.advanced.prvo.enableSameLenght= [BOOLEAN] : Enable/disable mutations that changes one element of an expression without affecting it's length
-
mutation.advanced.prvo.enableIncreaseLenght= [BOOLEAN] : Enable/disable mutations that changes an expression by adding a new element
-
mutation.advanced.prvo.enableDecreaseLenght= [BOOLEAN] : Enable/disable mutations that removes an element from an expression
-
mutation.advanced.prvo.enableOneByTwo= [BOOLEAN] : Enable/disable mutations that changes one field or method in a chained expression with a chained expression of size 2
-
mutation.advanced.prvo.enableTwoByOne= [BOOLEAN] : Enable/disable mutations that changes a sub chained expression of size 2 with one field or method
-
mutation.advanced.prvo.enableAllByOneLeft= [BOOLEAN] : Enable/disable mutations affecting a chained expression on the left side of an assignment statement replacing this expression with a variable or field
-
mutation.advanced.prvo.enableAllByOneRight= [BOOLEAN] : Enable/disable mutations affecting a chained expression on the right side of an assignment statement replacing this expression with a variable, field or null
-
mutation.advanced.prvo.enableSuper= [BOOLEAN] : Enable/disable the use of super in the generated mutations
-
mutation.advanced.prvo.enableThis= [BOOLEAN] : Enable/disable the use of this in the generated mutations
-
mutation.advanced.prvo.enableReplacementWithLiterals= [BOOLEAN] : Enable/disable the use of literals to replace expressions of size one
-
mutation.advanced.prvo.enableNullLiteral= [BOOLEAN] : Enable/disable the use of the literal null in the generated mutations
-
mutation.advanced.prvo.enableTrueLiteral= [BOOLEAN] : Enable/disable the use of the literal true in the generated mutations
-
mutation.advanced.prvo.enableFalseLiteral= [BOOLEAN] : Enable/disable the use of the literal false in the generated mutations
-
mutation.advanced.prvo.enableEmptyString= [BOOLEAN] : Enable/disable the use of the empty string literal in the generated mutations
-
mutation.advanced.prvo.enableZeroLiteral= [BOOLEAN] : Enable/disable the use of the literal 0 in the generated mutations
-
mutation.advanced.prvo.enableOneLiteral= [BOOLEAN] : Enable/disable the use of the literal 1 in the generated mutations
-
mutation.advanced.prvo.enableStringLiterals= [BOOLEAN] : Enable/disable the use of the string literals (collected from the method to mutate code) in the generated mutations
-
mutation.advanced.prvo.allowNumericLiteralVariations= [BOOLEAN] : Enable/disable number literals variations when generating mutants. A number literal variation is when given a number literal K add all it's variations within primitive types (integer, float, double, long), this option is disabled by default.
-
mutation.advanced.prvo.disablePrimitiveToObjectAssignments= [BOOLEAN] : Enable/disable mutants of the form
Object var = primitive type expression, this option is enabled by default. -
mutation.advanced.prvo.wrapPrimitiveToObjectAssignments= [BOOLEAN] : Enable/disable wrapping of mutants of the form
Object var = primitive type expression, wrapping will generatenew T(primitive type expression)where `T`` is a wrapper type for the primitive type of the original expression, this option is disabled by default. -
mutation.advanced.prvo.applyRefinedPRVOInMethodCallStatements= [BOOLEAN] : Enable/disable refinement in statements that only contains a method call, this option is disabled by default.
-
mutation.advanced.ror.replaceWithTrue=[BOOLEAN] : Enable/disable the replacement of boolean expressions with true
-
mutation.advanced.ror.replaceWithFalse= [BOOLEAN] : Enable/disable the replacement of boolean expressions with false
-
mutation.advanced.cor.andOperator= [BOOLEAN] : Enable/disable replacements with and operator
-
mutation.advanced.cor.orOperator= [BOOLEAN] : Enable/disable replacements with or operator
-
mutation.advanced.cor.xorOperator= [BOOLEAN] : Enable/disable replacements with xor operator
-
mutation.advanced.cor.bitAndOperator= [BOOLEAN] : Enable/disable replacements with bit and operator