Git Product home page Git Product logo

mutation-test's People

Contributors

domohuhn avatar marc-r2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

marc-r2

mutation-test's Issues

Verification command via command line flag

Having a command line flag that takes a string as argument for the verification command would users a quick start.

  • Add -c/--command="xxxxx" and -t/--timeout=60 as command line options

Using YAML as input file format

For most CI tools, YAML files are used as inputs. The binary should switch from xml files to YAML files as inputs, as its syntax is easier for humans to read and write.

can't run flutter tests...

Specifying (flutter test test/some_test_file.dart) as command in the input files (ex: config.xml) is throwing the following Error / Exception :
"Error while processing:
ProcessException: Das System kann die angegebene Datei nicht finden.

Command: flutter test test/example_test.dart"

Are "flutter test" commands not supported ?

Improve reporting

  • the statistics block should contain all information in a single table
  • program version should be in the report
  • total runtime should be included
  • Reporting should be moved out of the test runner

Show detected mutations in report

The reports currently only show the undetected mutations in the files. Showing all mutations gives a better picture in the reports.

Allow multiple rules files

Having the ability to combine multiple rule documents gives users more flexibility how they use the application.

Improve tests

The tests currently do not run code in several files (and codecov doesnot see them either):

  • html_reporter.dart
  • mutation_progress_bar.dart
  • mutation_test.dart
  • report_format.dart
  • test_runnner.dart

Deliveries for linux/mac

The deliveries for linux and mac are missing the executable permissions and should not have the .exe extension. It is probably better to use .tgz for linux as archive format.

Ideally, this should be automated using a github action.

RangeError (start): Invalid value: Not in inclusive range 0..176: 179

What could be causing such an Error ?

PS C:\Users\M\Desktop\my_app> dart run mutation_test mutation_testing/config.xml --rules mutation_testing/small_test.xml -d
Error while processing:
RangeError (start): Invalid value: Not in inclusive range 0..176: 179


My config.xml : 

<?xml version="1.0" encoding="UTF-8"?>
<mutations version="1.0">
  <!-- License: BSD-3-Clause  -->
  <directories>
    <directory recursive="true">lib
      <matching pattern="\.dart$"/>
    </directory>
  </directories>
  <exclude>
    <!-- lines can also be globally excluded  -->
    <lines begin="1" end="2"/>
  </exclude>
  
  <commands>
   <!-- <command group="test" expected-return="0" working-directory="./">dart //version</command> -->
    
    <command group="test" expected-return="0" working-directory="./">C:\scr\flutter\bin\flutetr.bat test</command>

  </commands>
</mutations>


my small_test.xml : 

<?xml version="1.0" encoding="UTF-8"?>
<mutations version="1.0">
   <!-- License: BSD-3-Clause  -->
   <!-- The rules element describes all mutations done during a mutation test -->
   <!-- The following children are parsed: literal and regex -->
   <!-- A literal element matches the literal text -->
   <!-- A regex element mutates source code if the regular expression matches -->
   <!-- Each of them must have at least one mutation child -->
   <rules>


    <!--this replaces (x op y,x) and (x op y,y)-->
    <regex pattern="([A-Za-z0-9._]+(?:\(\)|\s*))\s+([\*\/\+\-\~])\s+([A-Za-z0-9._]+(?:\(\)|\s*))" dotAll="false">
    <mutation text="$1"/>
    <mutation text="$3"/>
    </regex>
  
  </rules>
  <!-- This element creates a blacklist, allowing you to exclude parts from the mutations -->
  <exclude>

    <!-- excludes anything between two tokens  -->
    <token begin="//" end="\n"/>
    <token begin="#" end="\n"/>
    <token begin="import" end=";"/>

    <!-- excludes anything that matches a pattern  -->
    <regex pattern="/[*].*?[*]/" dotAll="true"/>
    <!-- exclude loops to prevent infinte tests -->
    <regex pattern="[\s]for[\s]*\(.*?\)[\s]*{" dotAll="true"/>
    <regex pattern="[\s]while[\s]*\(.*?\)[\s]*{.*?}" dotAll="true"/>
    <!-- lines can also be globally excluded  -->
    <!-- line index starts at 1  -->
    <lines begin="1" end="2"/>

  </exclude>

</mutations>

Generating mutants only for the code that is covered by test suites

We are trying to run a mutation test for our project daily nightly. The estimated time to complete the test shown by the tool is ~21h 12m 17s, which makes it hard to run the mutation test for the whole project.

As far as I understood, this tool generates the mutants for the code regardless of whether the test suites cover it. If so, it will be better to generate mutants only for the code covered by the test suites.

I'd also like to know how mutants are subjected to test suites. Is every mutant subjected to the whole test suite or only the test that covers the mutant itself?

Improve html reporting

The mutated lines should be enclosed in div elements and their style should be set via css instead of inline styles.

Reporting Mechanism for the kill Matrix

I am currently working on a Flutter testing project to implement effective mutation testing techniques. However, these techniques require a kill matrix that can illustrate which test kills which mutant. I was wondering if there is any way to detect this using built-in mechanisms of the tool

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.