Questions tagged [infection]

Infection is a PHP mutation testing framework based on AST (Abstract Syntax Tree) mutations.

What is Infection

Infection is a PHP mutation testing framework based on AST (Abstract Syntax Tree) mutations. It works as a CLI tool and can be executed from your project’s root.

Infection currently supports PHPUnit and PhpSpec test frameworks, requires PHP 7.1+ and Xdebug/phpdbg installed.

In a nutshell, it:

  • runs the test suit
  • mutates the source code with a set of predefined mutators (mutation operators)
  • collects the results of killed, escaped mutants and timeouts

Useful links

Documentation: https://infection.github.io/guide/

GitHub: https://github.com/infection/infection

A detailed post about Mutation Testing and Infection: https://medium.com/@maks_rafalko/infection-mutation-testing-framework-c9ccf02eefd1

14 questions
1
vote
1 answer

Possible infection through the tor network

After initializing the tor network service I have seen that there was a connection established to the IP 131.188.40.188 to port 11180. I did a scan with nmap and the result was as follows: There was an openssh service on that port, and I was…
Ioritz
  • 21
  • 4
1
vote
0 answers

Mutants were not covered by tests in PHP Infection

I'm running some mutation tests ("infection/infection": "^0.26.1") and for some unknown reason PHP Infection claims that there are tests that are not covered even with the unit tests written there. Here is the error alleged by Infection: 1)…
José Victor
  • 125
  • 10
1
vote
1 answer

Why does my secure Travis CI environment variable not work?

Every time I deploy to Github, Travis CI says at the end of its report: Dashboard report has not been sent: neither INFECTION_BADGE_API_KEY nor STRYKER_DASHBOARD_API_KEY were found in the environment I've tried setting the environment variable at…
CJ Dennis
  • 4,226
  • 2
  • 40
  • 69
1
vote
1 answer

PHP Infection all mutants were not covered by tests

I'm trying to implement the infection/infection php mutation testing library into a new project of mine. I've set up some tests which all pass, then ran infection. Infection returns the following: You are running Infection with xdebug enabled. …
TBPixel
  • 31
  • 2
0
votes
0 answers

WordPress malware returns Even After Deleting and Reinstalling WordPress Afresh

Hello Wordpress experts, I have been facing a problem with my wordpress website and don't just know what to do again. I have removed wordpress malwares from several site successfully before now but this particular site is totally confusing right…
spottykay
  • 9
  • 1
0
votes
0 answers

simulations of UTI infection and the development of antibiotics resistance

this is my first time posting a question on this site. I'm hoping to get some assistance with my code. I'm simulating the spread of urinary tract infection in humans and want to study the evolution of antibiotic resistance strains for bacteria…
raneem
  • 11
0
votes
1 answer

Realistic age structured model using ODE from the deSolve package

I am trying to simulate a realistic age structured model where all individuals could shift into the following age group at the end of the time step (and not age continuously at a given rate) using ODE from the deSolve package. Considering for…
Andyga
  • 15
  • 4
0
votes
1 answer

Setting nodes within a networkx graph as infected and uninfected

I have the karate club graph, I wish to determine a few random nodes within there as infected nodes, while the rest are uninfected. I tried to use: G = nx.karate_club_graph() #pos = nx.spectral_layout(G) bb =…
Landon
  • 93
  • 11
0
votes
0 answers

How can I address the attributes of other turtles in the "procedure-calling" turtle's radius and how long they stay there? In Netlogo

I am building a model in Netlogo where I am simulating the spread of a virus. I have looked at other virus models but so far haven't found a solution to my problem. I would like each agent interaction to have a specific transmission-probability,…
Johanna
  • 11
  • 4
0
votes
1 answer

Infection Throws Exeption, but why, and how to handle it?

The Task is that the error does bot explain that problem right. The Error: Project tests must be in a passing state before running Infection. Infection runs the test suite in a RANDOM order. Make sure your tests do not have hidden dependencies.…
episch
  • 388
  • 2
  • 19
0
votes
1 answer

So, a mutant escaped. Now what?

I've just managed to get mutation testing working for the first time. My usual testing framework is Codeception but as of writing, it is not compatible with mutation testing (although I believe work is being done on it and it's not far off). I'm…
CJ Dennis
  • 4,226
  • 2
  • 40
  • 69
0
votes
2 answers

phpdbg hits memory limit when mutation testing with Infection

I keep getting a memory exhausted error when trying to run infection tests using phpdbg. I've tried setting the -d memory_limit but it seems to get ignored. Below is some sample output: $ phpdbg -qrr -d memory_limit=1G vendor/bin/infection You are…
Xethron
  • 1,116
  • 9
  • 24
0
votes
1 answer

Finish phpunit-tests always during infection testing: teardown method not called after a failure

I use the infection testing framework https://github.com/infection/infection During a test some parts of the code are changed so that the test fails und does not run completely nor use the PHPUnit Teardown method. My question is: Does someone know a…
-1
votes
1 answer

Is there a way to delete/get rid of a Man-In-the-Browser infection?

I was cruising around the browser reading articles about MItB and still can't find a technical way of getting rid of an MItB infection. hence, I was wondering: Is there is such a way to delete an MItB attack technically? If you were to click an…
AetherMC
  • 13
  • 2