You probably have a lot of tests but their goal is to ensure quality of your production code. What about the quality of your testing code? Code coverage? Nah!
Voxxed Days Athens - Improve your tests with Mutation TestingNicolas Fränkel
The document discusses mutation testing as a way to ensure the quality of test code. Mutation testing works by modifying the source code in small ways (called mutants) and checking if tests can detect the changes. If tests still pass despite a mutant, it means the tests are not properly validating that code section. The document recommends Java tools like PIT for mutation testing and describes common mutators. It acknowledges mutation testing is slow and imperfect but can still help improve test quality by finding overlooked cases. The document concludes that while mutation testing is useful, a variety of test types are needed to fully ensure code quality.
ConFoo - Improve your tests with mutation testingNicolas Fränkel
The document discusses mutation testing as a way to ensure the quality of test code. Mutation testing works by modifying the source code in small ways (called mutations) and checking if tests can detect the changes. This helps identify weaknesses or gaps in test coverage that code coverage metrics alone may miss. The document recommends using a tool like PIT for Java projects, which automatically generates mutations and analyzes whether tests can kill the mutated code or if mutants survive undetected. Mutation testing is slow but can help improve test quality by finding overlooked cases.
This document discusses mutation testing as a way to improve test quality beyond just code coverage. Mutation testing works by making small changes or "mutations" to the production code and seeing if tests can detect the changes. If tests do not detect a mutation, the mutant is considered surviving and indicates a problem with test quality. The document provides examples of how mutation testing can identify issues and recommends tools like PIT for performing mutation testing in Java projects. It also discusses techniques for making mutation testing more practical for continuous integration like limiting the scope of analysis.
TestCon Europe - Mutation Testing to the Rescue of Your TestsNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant? Come discover mutation testing and make sure your never forget another assert again.
In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn’t mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant.
In this talk, Nicolas will explain how Code Coverage is computed and what its inherent flaw is. Afterwards, he will describe how Mutation Testing work and how it helps pointing out code that is tested but leave out corner cases. He will also demo PIT, a Java production-grade framework that enables Mutation Testing.
Decision-making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be
executed if the condition is determined to be true, and
optionally, other statements to be executed if the condition is determined to be false.
Shown below is the general form of a typical decision-making structure found in most of the programming languages:
The document discusses different types of conditional statements in C programming including if statements, if-else statements, nested if statements, else if chains, and switch statements. It provides examples of the syntax for each statement type and describes how they allow programmers to execute different code based on whether a condition is true or false. The document also compares switch statements to if-else ladders, outlining advantages and limitations of each as well as recommendations for when each type of conditional statement is best used.
Voxxed Days Athens - Improve your tests with Mutation TestingNicolas Fränkel
The document discusses mutation testing as a way to ensure the quality of test code. Mutation testing works by modifying the source code in small ways (called mutants) and checking if tests can detect the changes. If tests still pass despite a mutant, it means the tests are not properly validating that code section. The document recommends Java tools like PIT for mutation testing and describes common mutators. It acknowledges mutation testing is slow and imperfect but can still help improve test quality by finding overlooked cases. The document concludes that while mutation testing is useful, a variety of test types are needed to fully ensure code quality.
ConFoo - Improve your tests with mutation testingNicolas Fränkel
The document discusses mutation testing as a way to ensure the quality of test code. Mutation testing works by modifying the source code in small ways (called mutations) and checking if tests can detect the changes. This helps identify weaknesses or gaps in test coverage that code coverage metrics alone may miss. The document recommends using a tool like PIT for Java projects, which automatically generates mutations and analyzes whether tests can kill the mutated code or if mutants survive undetected. Mutation testing is slow but can help improve test quality by finding overlooked cases.
This document discusses mutation testing as a way to improve test quality beyond just code coverage. Mutation testing works by making small changes or "mutations" to the production code and seeing if tests can detect the changes. If tests do not detect a mutation, the mutant is considered surviving and indicates a problem with test quality. The document provides examples of how mutation testing can identify issues and recommends tools like PIT for performing mutation testing in Java projects. It also discusses techniques for making mutation testing more practical for continuous integration like limiting the scope of analysis.
TestCon Europe - Mutation Testing to the Rescue of Your TestsNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant? Come discover mutation testing and make sure your never forget another assert again.
In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn’t mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant.
In this talk, Nicolas will explain how Code Coverage is computed and what its inherent flaw is. Afterwards, he will describe how Mutation Testing work and how it helps pointing out code that is tested but leave out corner cases. He will also demo PIT, a Java production-grade framework that enables Mutation Testing.
Decision-making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be
executed if the condition is determined to be true, and
optionally, other statements to be executed if the condition is determined to be false.
Shown below is the general form of a typical decision-making structure found in most of the programming languages:
The document discusses different types of conditional statements in C programming including if statements, if-else statements, nested if statements, else if chains, and switch statements. It provides examples of the syntax for each statement type and describes how they allow programmers to execute different code based on whether a condition is true or false. The document also compares switch statements to if-else ladders, outlining advantages and limitations of each as well as recommendations for when each type of conditional statement is best used.
This document contains information about programming languages and examples of programs written in C programming language. It discusses different programming concepts like variables, loops, switch statements, and provides 5 examples of programs using these concepts. The programs demonstrate how to print outputs based on user input or calculations using switch statements, loops, and variables. The document is meant to be submitted to Prof. Erwin M. Globio and provides resources to learn programming at http://eglobiotraining.com.
Presentation on C Switch Case StatementsDipesh Pandey
The document presents information on C switch case statements including:
- The switch statement allows choosing from multiple selections by passing control to one of the case statements based on the value of an expression.
- The syntax includes a switch expression, cases with condition blocks ending in break, and an optional default block.
- A flowchart illustrates the flow of a switch case statement.
- Break statements end processing of a case and branch to the end, while default executes if no case matches and can appear anywhere.
This document discusses switch-case statements in C programming. It explains that switch-case allows programmers to make decisions from multiple choices based on an integer expression. Each case must have a different constant value. The break statement is used to terminate a switch. Expressions and char values can be used in cases if they are constant. Switch statements are useful for menu-driven programs. They have advantages over if-else statements in that compilers generate jump tables, making switches faster at execution time.
Introduction to control structure in C Programming Language include decision making (if statement, if..else statement, if...else if...else statement, nested if...else statement, switch...case statement), Loop(for loop, while loop, do while loop, nested loop) and using keyword(break, continue and goto)
There are three main types of control structures in computer programming: sequential logic, selection logic, and iteration logic. Sequential logic executes code line-by-line. Selection logic (e.g. if/else statements) allows executing code conditionally. Iteration logic (e.g. for loops) repeats code execution in loops. The document provides examples of if/else, nested if, switch statements, and the conditional operator for implementing various control structures in C programming.
A switch statement allows a program to evaluate an expression and branch to different parts of code based on the resulting value. It provides an alternative to multiple if/else statements. The switch expression is compared to the values provided in each case, and if a match is found, the associated block of code is executed until a break statement. If no match is found, an optional default case is executed. Labels such as case and default are used to mark the different potential branches of code.
This document discusses various control structures in C programming language including if, if-else, nested if-else, switch, break, continue and ternary operators. It provides syntax and examples for each control structure. The if statement is used for simple decisions while if-else is used for two-way decisions. Nested if-else allows for multiple conditions to be checked. Switch statement compares a value to multiple cases. Break and continue statements are used to control loops. The ternary operator provides a short-hand for if-else statements. In the end, contact details are provided to learn more about programming courses.
The document discusses various control structures in the C language including conditional statements like if, if-else-if and switch statements, as well as loops and the goto statement. It provides examples of using if statements to check for even or odd numbers, if-else-if to check positive, negative and zero numbers, and switch statements to check the modulus of a number. The break and goto statements are also explained briefly.
The document discusses different control structures in the C programming language including if-else statements, nested if statements, switch statements, break statements, and continue statements. It provides syntax examples and explanations for how each statement directs program flow. The key control structures covered are if-else for conditional execution, switch for multi-way decisions, break to exit loops, and continue to skip to the next loop iteration.
The document discusses three types of jumping statements in C language: break, continue, and goto.
1) The break statement terminates the nearest enclosing loop or switch statement and transfers execution to the statement following the terminated statement.
2) The continue statement skips the rest of the current loop iteration and transfers control to the loop check.
3) The goto statement unconditionally transfers control to the labeled statement. It is useful for branching within nested loops when a break statement cannot exit properly.
Decision making and branching in c programmingPriyansh Thakar
The document discusses different types of decision making and branching statements in C programming including if, if-else, nested if-else, else-if ladder, switch case, and goto statements. It provides examples of using each statement type to check conditions and execute different blocks of code based on whether the conditions are true or false. Key points covered include the syntax, flow, and use of each statement type to evaluate conditions and direct program flow.
Decision making statements in C programmingRabin BK
The document discusses various decision making statements in C programming language, including if, if-else, if-else if-else, nested if, switch, ternary operator (? :) and goto statements. It provides syntax and examples of each statement type. Key decision making statements covered are if, if-else, if-else if-else for multi-way decisions, switch as a multi-way decision statement, and the ternary operator for two-way decisions. References and queries sections are also included.
White box testing involves closely examining the internal logic and structure of code. It focuses on testing individual program paths by exercising conditions, loops, and logical decisions. Test cases are designed to ensure each path is tested at least once to cover all statements. Cyclomatic complexity measures the number of independent paths in a program and provides an upper bound for the number of test cases needed. Flow graphs are used to represent program control flow and determine the cyclomatic complexity and basis path testing set.
The document discusses various control structures used in programming, including sequence, repetition (loops), and selection (branching). It covers common loop and conditional statements like while, for, if/else, switch/case. Control structures allow programs to execute instructions in different orders depending on conditions or to repeat steps multiple times. Keywords like break and continue change the normal flow of loops.
The Three Basic Selection Structures in C++ Programming ConceptsTech
Now check the powerpoint presentation about selection structures in programming. For more visit www.techora.net
Three types of selection structures are available like :
1 - Sequence Structure
2 - Selection Strcuture
3 - Repetition Structure
In this PPT slide, we discuss about the selection structure
1 - if statements
2 - if else statement
3 - switch statement
Flow control statements like if-else, while, for, switch etc. allow a program to conditionally execute blocks of code or repeat blocks of code. They break up the flow of execution. if-else is used for conditional execution based on a boolean expression. while and do-while loops repeat a statement or block until a boolean condition is false. for loops initialize a variable, check a condition, and update the variable on each iteration. break exits the current loop, continue skips to the next iteration, and return exits the current method.
This document discusses conditional logic and decision making in C# programming. It covers using if/else statements with logical conditions and operands to control program flow. Specifically, it explains:
1. Using if/else statements to check conditions and branch program execution based on true/false results.
2. Setting logical conditions using comparison operators and checking multiple conditions using && and ||.
3. Additional branching options like if only, else if, and switch statements.
4. Examples of comparing different data types in conditions like boolean, char, and string.
5. Exercises that involve renaming controls, drafting pseudocode, and debugging if/else logic in a GUI application.
GeeCON - Improve your tests with Mutation TestingNicolas Fränkel
This document discusses mutation testing as a way to improve test quality. Mutation testing works by modifying the source code slightly (creating mutants) and checking if tests can detect the changes. This is more effective than just measuring code coverage, which can be gamed. The document recommends using a tool like PIT to perform mutation testing, and provides tips on configuring it for performance when running as part of test suites. While mutation testing has limitations, it can help prioritize testing of critical or complex code.
Joker - Improve your tests with mutation testingNicolas Fränkel
This document discusses mutation testing as a way to evaluate test quality beyond just code coverage metrics. Mutation testing works by modifying the production code in small ways (called mutants) and then re-running the test suite to see if the tests can detect the changes. If the tests still pass despite a mutant, it indicates weaknesses in the test suite. The document provides an overview of how mutation testing works and tools like PIT that can implement it for Java projects. It also discusses strategies for making mutation testing practical for continuous integration like limiting scopes and leveraging incremental analysis between runs.
This document contains information about programming languages and examples of programs written in C programming language. It discusses different programming concepts like variables, loops, switch statements, and provides 5 examples of programs using these concepts. The programs demonstrate how to print outputs based on user input or calculations using switch statements, loops, and variables. The document is meant to be submitted to Prof. Erwin M. Globio and provides resources to learn programming at http://eglobiotraining.com.
Presentation on C Switch Case StatementsDipesh Pandey
The document presents information on C switch case statements including:
- The switch statement allows choosing from multiple selections by passing control to one of the case statements based on the value of an expression.
- The syntax includes a switch expression, cases with condition blocks ending in break, and an optional default block.
- A flowchart illustrates the flow of a switch case statement.
- Break statements end processing of a case and branch to the end, while default executes if no case matches and can appear anywhere.
This document discusses switch-case statements in C programming. It explains that switch-case allows programmers to make decisions from multiple choices based on an integer expression. Each case must have a different constant value. The break statement is used to terminate a switch. Expressions and char values can be used in cases if they are constant. Switch statements are useful for menu-driven programs. They have advantages over if-else statements in that compilers generate jump tables, making switches faster at execution time.
Introduction to control structure in C Programming Language include decision making (if statement, if..else statement, if...else if...else statement, nested if...else statement, switch...case statement), Loop(for loop, while loop, do while loop, nested loop) and using keyword(break, continue and goto)
There are three main types of control structures in computer programming: sequential logic, selection logic, and iteration logic. Sequential logic executes code line-by-line. Selection logic (e.g. if/else statements) allows executing code conditionally. Iteration logic (e.g. for loops) repeats code execution in loops. The document provides examples of if/else, nested if, switch statements, and the conditional operator for implementing various control structures in C programming.
A switch statement allows a program to evaluate an expression and branch to different parts of code based on the resulting value. It provides an alternative to multiple if/else statements. The switch expression is compared to the values provided in each case, and if a match is found, the associated block of code is executed until a break statement. If no match is found, an optional default case is executed. Labels such as case and default are used to mark the different potential branches of code.
This document discusses various control structures in C programming language including if, if-else, nested if-else, switch, break, continue and ternary operators. It provides syntax and examples for each control structure. The if statement is used for simple decisions while if-else is used for two-way decisions. Nested if-else allows for multiple conditions to be checked. Switch statement compares a value to multiple cases. Break and continue statements are used to control loops. The ternary operator provides a short-hand for if-else statements. In the end, contact details are provided to learn more about programming courses.
The document discusses various control structures in the C language including conditional statements like if, if-else-if and switch statements, as well as loops and the goto statement. It provides examples of using if statements to check for even or odd numbers, if-else-if to check positive, negative and zero numbers, and switch statements to check the modulus of a number. The break and goto statements are also explained briefly.
The document discusses different control structures in the C programming language including if-else statements, nested if statements, switch statements, break statements, and continue statements. It provides syntax examples and explanations for how each statement directs program flow. The key control structures covered are if-else for conditional execution, switch for multi-way decisions, break to exit loops, and continue to skip to the next loop iteration.
The document discusses three types of jumping statements in C language: break, continue, and goto.
1) The break statement terminates the nearest enclosing loop or switch statement and transfers execution to the statement following the terminated statement.
2) The continue statement skips the rest of the current loop iteration and transfers control to the loop check.
3) The goto statement unconditionally transfers control to the labeled statement. It is useful for branching within nested loops when a break statement cannot exit properly.
Decision making and branching in c programmingPriyansh Thakar
The document discusses different types of decision making and branching statements in C programming including if, if-else, nested if-else, else-if ladder, switch case, and goto statements. It provides examples of using each statement type to check conditions and execute different blocks of code based on whether the conditions are true or false. Key points covered include the syntax, flow, and use of each statement type to evaluate conditions and direct program flow.
Decision making statements in C programmingRabin BK
The document discusses various decision making statements in C programming language, including if, if-else, if-else if-else, nested if, switch, ternary operator (? :) and goto statements. It provides syntax and examples of each statement type. Key decision making statements covered are if, if-else, if-else if-else for multi-way decisions, switch as a multi-way decision statement, and the ternary operator for two-way decisions. References and queries sections are also included.
White box testing involves closely examining the internal logic and structure of code. It focuses on testing individual program paths by exercising conditions, loops, and logical decisions. Test cases are designed to ensure each path is tested at least once to cover all statements. Cyclomatic complexity measures the number of independent paths in a program and provides an upper bound for the number of test cases needed. Flow graphs are used to represent program control flow and determine the cyclomatic complexity and basis path testing set.
The document discusses various control structures used in programming, including sequence, repetition (loops), and selection (branching). It covers common loop and conditional statements like while, for, if/else, switch/case. Control structures allow programs to execute instructions in different orders depending on conditions or to repeat steps multiple times. Keywords like break and continue change the normal flow of loops.
The Three Basic Selection Structures in C++ Programming ConceptsTech
Now check the powerpoint presentation about selection structures in programming. For more visit www.techora.net
Three types of selection structures are available like :
1 - Sequence Structure
2 - Selection Strcuture
3 - Repetition Structure
In this PPT slide, we discuss about the selection structure
1 - if statements
2 - if else statement
3 - switch statement
Flow control statements like if-else, while, for, switch etc. allow a program to conditionally execute blocks of code or repeat blocks of code. They break up the flow of execution. if-else is used for conditional execution based on a boolean expression. while and do-while loops repeat a statement or block until a boolean condition is false. for loops initialize a variable, check a condition, and update the variable on each iteration. break exits the current loop, continue skips to the next iteration, and return exits the current method.
This document discusses conditional logic and decision making in C# programming. It covers using if/else statements with logical conditions and operands to control program flow. Specifically, it explains:
1. Using if/else statements to check conditions and branch program execution based on true/false results.
2. Setting logical conditions using comparison operators and checking multiple conditions using && and ||.
3. Additional branching options like if only, else if, and switch statements.
4. Examples of comparing different data types in conditions like boolean, char, and string.
5. Exercises that involve renaming controls, drafting pseudocode, and debugging if/else logic in a GUI application.
GeeCON - Improve your tests with Mutation TestingNicolas Fränkel
This document discusses mutation testing as a way to improve test quality. Mutation testing works by modifying the source code slightly (creating mutants) and checking if tests can detect the changes. This is more effective than just measuring code coverage, which can be gamed. The document recommends using a tool like PIT to perform mutation testing, and provides tips on configuring it for performance when running as part of test suites. While mutation testing has limitations, it can help prioritize testing of critical or complex code.
Joker - Improve your tests with mutation testingNicolas Fränkel
This document discusses mutation testing as a way to evaluate test quality beyond just code coverage metrics. Mutation testing works by modifying the production code in small ways (called mutants) and then re-running the test suite to see if the tests can detect the changes. If the tests still pass despite a mutant, it indicates weaknesses in the test suite. The document provides an overview of how mutation testing works and tools like PIT that can implement it for Java projects. It also discusses strategies for making mutation testing practical for continuous integration like limiting scopes and leveraging incremental analysis between runs.
Codemash - Mutation testing to the rescue of your testsNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant? Come discover mutation testing and make sure your never forget another assert again. In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn’t mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant. In this talk, I will explain how Code Coverage is computed and what its inherent flaw is. Afterwards, I will describe how Mutation Testing work and how it helps pointing out code that is tested but leave out corner cases. I will also demo PIT, a Java production-grade framework that enables Mutation Testing.
As metrics go, Test Coverage is a real bad one. Not only is it easy to game on purpose, 100% does not guarantee anything. Fortunately, Mutation Testing can help!
Codemotion Berlin - Improve your tests with Mutation TestingNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant? Come discover mutation testing and make sure your never forget another assert again. In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn’t mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant. In this talk, we will explain how Code Coverage is computed, what its inherent flaw is and how Mutation Testing can help us in this regard.
DevExperience - Improve your tests with mutation testingNicolas Fränkel
Unit testing ensures your production code is relevant. But what does ensure your testing code is relevant?
In the realm of testing, the code coverage metrics is the most often talked about. However, it doesn't mean that the test has been useful or even that an assert has been coded. Mutation testing is a strategy to make sure that the test code is relevant.
I.T.A.K.E Unconference - Mutation testing to the rescue of your testsNicolas Fränkel
This document summarizes mutation testing and how it can be used to test test quality. Mutation testing works by modifying the production code in small ways (e.g. changing a relational operator) and then running the test suite to see if the tests can detect the mutations. This is more effective than just measuring code coverage at ensuring tests are rigorous. The document outlines some Java tools for mutation testing like PIT and discusses how mutation testing can identify weaknesses in a test suite. Drawbacks like performance issues are also covered, along with ways to mitigate slowness like incremental analysis.
The document discusses mutation testing and provides tips for implementing it. It explains different types of mutations like statement, value, and decision mutations. It also discusses how to calculate mutation score and challenges like cost. Examples are provided using tools like Pitest and Stryker. Advice is given around using mocks, refactoring complex code, and targeting tests to improve mutation testing.
Must.kill.mutants. TopConf Tallinn 2016Gerald Muecke
Mutation Testing has been around for almost 20 years. Originated in academic research it has found its way into the developer’s toolbox being easy to setup, use and producing valuable results. But what is mutation testing? It’s a practice to determine the actual value of an automated test suite and automatically explore parts of the code that have yet been untested, unveiling surprises even to experienced test automation developers. Given a test suite that runs successfully, mutation testing will inject changes to the production code based on a set of rules and reruns the test to determine if the test will fail. Depending on the size of the code base the execution time increases exponentially due to the sheer amount of permutations, requiring thorough planning, focus and prioritization.
Must.Kill.Mutants. Agile Testing Days 2017Gerald Muecke
The document discusses quality assurance and mutation testing. It defines quality assurance as preventing defects in manufactured products. It then discusses mutation testing, which involves injecting faults into code based on mutation operators to verify if tests can detect the faults. The document provides examples of mutation operators and tools for different programming languages. It notes that while mutation testing has limitations, it is valuable for finding bugs in test suites and improving test quality. It recommends including mutation testing in projects and using it with common sense to iteratively improve test suites.
MUTANTS KILLER - PIT: state of the art of mutation testing system Tarin Gamberini
The document discusses mutation testing and the PIT mutation testing system. It begins with an overview of mutation testing, which involves making small changes to a program to generate mutant versions and running tests against these mutants to evaluate test effectiveness. The document then covers key concepts of PIT including the various mutators it uses to generate mutants and how it leverages test coverage to efficiently run tests against mutants. An example using a sample Ticket class demonstrates how PIT reports can identify weaknesses in tests by showing mutants that were killed or lived. The document promotes using mutation testing and PIT to evaluate test quality and improve test effectiveness at finding faults.
Kill the mutants - A better way to test your testsRoy van Rijn
This document discusses mutation testing as a way to thoroughly test code. Mutation testing works by automatically making small changes or "mutations" to code and seeing if tests can detect the changes. It can find bugs in test code that simple code coverage misses. The document explains how to implement mutation testing with the PIT tool, which can generate mutants, run tests against mutant code, and produce reports. Mutation testing improves test quality but requires more computing resources than basic testing.
Kill the mutants and test your tests - Roy van RijnNLJUG
Quis custodiet ipsos custodes? Better known as: *Who watches the watchmen?* We are all writing tests, doing TDD, BDD. We measure the quality of the tests with line coverage or (even better) branch coverage. This gives you a false sense of security. I've seen projects with tests which have 100% branch coverage but not a single assertion! This is where mutation testing helps out. By creating broken mutated instances of your codebase (mutants) this should result in failing unit tests. This way we can verify that slight code changes (like real life bugs) actually break your tests. In this talk I'll explain what mutation testing is and how it works. We'll also compare some Java frameworks (PIT, Jester, Jumble) that enable automatic mutation testing in your continuous build and how you can start doing mutation testing *right now*.
This document provides an overview of mutation testing and the Pitest tool. It defines mutation testing as seeding artificial defects into source code to check if tests detect them. It describes various mutators that Pitest uses to alter code, such as changing relational operators or removing method calls. The document also outlines how to set up Pitest in a Maven project and review the test coverage report. It concludes that mutation testing can find bugs and redundant code but requires significant time to run all mutants. Not all mutants need to be killed to ensure quality.
This document discusses mutation testing and how it can be used to evaluate test quality. Mutation testing works by artificially inserting bugs called "mutants" into code and seeing if tests can detect the mutations. If tests fail on a mutant, it is considered "killed", otherwise the mutant is said to have "survived". The document demonstrates how to use the PIT mutation testing tool on simple calculator code and a larger codebase. Adoption of mutation testing has increased in recent decades as tools have improved performance. Mutation testing can help find gaps in test coverage and ensure tests are properly evaluating the logic of the code.
A conjecture, even when has been accepted during a long period of time, is not even still a proof. This presentation tries to explain how developers unconsciously create and establish paths that can be taken by their human errors in order to become system failures, and how mutation testing technique is used to effectively remove these undesired paths.
The document discusses unit testing and mutation testing. It provides information on the purpose of unit tests, types of unit testing smells/quality gaps, and how mutation testing can help identify ineffective tests. It then gives examples of code for a "KATA" module and "FIX" module to demonstrate mutation testing. Key points made include:
- Mutation testing involves intentionally introducing small errors ("mutants") into code and ensuring unit tests fail as expected, whereas code coverage alone does not validate test effectiveness.
- Three types of mutation testing are discussed: decision, statement, and value mutation.
- Mutation testing can help identify regressions more effectively than relying on code coverage or manual testing alone.
-
Shift-Left Testing: QA in a DevOps World by David LaulusaQA or the Highway
Shift-left testing involves injecting quality earlier in the software development process through techniques like unit testing, test-driven development, and regression testing. The presentation discusses principles for effective testing including equivalence partitioning, boundary value analysis, and combinatorial testing. It emphasizes the importance of collaboration between testers and developers through practices like dependency injection and test automation.
SnowCamp - Adding search to a legacy applicationNicolas Fränkel
Most applications evolve to a point where they need to provide search capabilities. But updating an application is always a risk. Plus, sometimes, you don’t have access to the source code. The easiest way to access the data is by getting them directly from the database.
The initial load is the easiest step. However, how do you keep the search index in sync with the database? How do you keep the latency between the search store and the source of truth, so your users don’t have to wait for the next run of the batch to access the newest changes?
In this live coding session, we will show you how you can solve this issue by connecting Elasticsearch to the database with a touch of Hazelcast.
On dit que GitHub est le CV d'un développeur. Un rapide coup d'œil à votre historique de commit et les recruteurs savent tout de vous. Cette approche comporte quelques problèmes. La plupart des entreprises ne publient même pas leur code sous une licence Open Source. Si vous travaillez pour l'une d'entre elles, et si vous n'êtes pas un développeur Open Source les soirs et les week-ends, alors vous n'avez aucune chance.
Récemment, GitHub a permis un certain degré de personnalisation de son profil. Ainsi, même si votre historique de commit a plus de blanc que de vert, vous pouvez fournir un bon point d'entrée pour les employeurs potentiels. Mais ça ne vaut que l'effort que vous y mettez et les données perdent leur valeur rapidement. Pourtant, avec un peu de travail et l'aide d'outils d'automatisation (tels que GitHub Actions), vous pouvez présenter un profil toujours à jour.
Zero-downtime deployment on Kubernetes with HazelcastNicolas Fränkel
Kubernetes allows a lot. After discovering its features, it’s easy to think it can magically transform your application deployment process into a painless no-event. For Hello World applications, that is the case. Unfortunately, not many of us do deploy such applications day-to-day because we need to handle state. Though it would be much easier to have stateless apps, and despite our best efforts in this direction, state is found in (at least) two places: sessions and databases.
You need to think keeping the state while stopping and starting application nodes. In this talk, I’ll demo how to update a Spring Boot app deployed on a Kubernetes cluster with a non-trivial database schema change with the help of Hazelcast, while keeping the service up during the entire update process.
jLove - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
When one’s app is challenged with poor performances, it’s easy to set up a cache in front of one’s SQL database. It doesn’t fix the root cause (e.g. bad schema design, bad SQL query, etc.) but it gets the job done. If the app is the only component that writes to the underlying database, it’s a no-brainer to update the cache accordingly, so the cache is always up-to-date with the data in the database.
Things start to go sour when the app is not the only component writing to the DB. Among other sources of writes, there are batches, other apps (shared databases exist unfortunately), etc. One might think about a couple of ways to keep data in sync i.e. polling the DB every now and then, DB triggers, etc. Unfortunately, they all have issues that make them unreliable and/or fragile.
You might have read about Change-Data-Capture before. It’s been described by Martin Kleppmann as turning the database inside out: it means the DB can send change events (SELECT, DELETE and UPDATE) that one can register to. Just opposite to Event Sourcing that aggregates events to produce state, CDC is about getting events out of states. Once CDC is implemented, one can subscribe to its events and update the cache accordingly. However, CDC is quite in its early stage, and implementations are quite specific.
In this talk, I’ll describe an easy-to-setup architecture that leverages CDC to have an evergreen cache.
BigData conference - Introduction to stream processingNicolas Fränkel
This document discusses stream processing and summarizes a presentation about the topic. It introduces Hazelcast Jet as a stream processing engine and covers open data standards like GTFS. It also describes a demo that uses GTFS data to enrich public transit vehicle position updates in real-time using Hazelcast Jet. The presentation discusses streaming approaches, benefits over batch processing, and provides an overview of stream processing concepts.
ADDO - Your own Kubernetes controller, not only in GoNicolas Fränkel
In Kubernetes, operators allow the API to be extended to your heart content. If one task requires too much YAML, it’s easy to create an operator to take care of the repetitive cruft, and only require a minimum amount of YAML.
On the other hand, since its beginnings, the Go language has been advertised as closer to the hardware, and is now ubiquitous in low-level programming. Kubernetes has been rewritten from Java to Go, and its whole ecosystem revolves around Go. For that reason, It’s only natural that Kubernetes provides a Go-based framework to create your own operator. While it makes sense, it requires organizations willing to go down this road to have Go developers, and/or train their teams in Go. While perfectly acceptable, this is not the only option. In fact, since Kubernetes is based on REST, why settle for Go and not use your own favorite language?
In this talk, I’ll describe what is an operator, how they work, how to design one, and finally demo a Java-based operator that is as good as a Go one.
OSCONF Jaipur - A Hitchhiker's Tour to Containerizing a Java applicationNicolas Fränkel
As “the Cloud” becomes more and more widespread, now is a good time to assess how you can containerize your Java application. I assume you’re able to write a a Dockerfile around the generated JAR. However, each time the application’s code will change, the whole image will need to be rebuilt. If you’re deploying to a local Kubernetes cluster environment, this increases that much the length of the feedback loop.
In this demo-based talk, I’ll present different ways to get your Java app in a container: Dockerfile, Jib, and Cloud Native Buildpacks. We will also have a look at what kind of Docker image they generate, how they layer the images, whether those images are compatible with skaffold, etc.
GeekcampSG 2020 - A Change-Data-Capture use-case: designing an evergreen cacheNicolas Fränkel
CDC is a brand new approach that "turns the database inside out": it allows to get events out of the database state. This can be leveraged to get a cache that is never stale.
JavaDay Istanbul - 3 improvements in your microservices architectureNicolas Fränkel
While a microservices architecture is more scalable than a monolith, it has a direct hit on performance.
To cope with that, one performance improvement is to set up a cache. It can be configured for database access, for REST calls or just to store session state across a cluster of server nodes. In this demo-based talk, I’ll show how Hazelcast In-Memory Data Grid can help you in each one of those areas and how to configure it. Hint: it’s much easier than one would expect.
At a point in the past, it was forecast that Java would die, but the JVM platform would be its legacy. And in fact, for a long time, the JVM has been tremendously successful. Wikipedia itself lists a bunch of languages that run on it, some of them close to Java e.g. Kotlin, some of them very remote e.g. Clojure.
But nowadays, the Cloud is becoming ubiquitous. Containerization is the way to go to alleviate some of the vendor lock-in issues. Kubernetes is a de facto platform. If a container needs to be killed for whatever reason (resource consumption, unhealthy, etc.), a new one needs to replace it as fast as possible. In that context, the JVM seems to be a dead-end: its startup time is huge in comparison to a native process. Likewise, it consumes a lot of memory that just increase the monthly bill.
What does that mean for us developers? Has all the time spent in learning the JVM ecosystem been invested with no hope of return over investment? Shall we need to invest even more time in new languages, frameworks, libraries, etc.? That is one possibility for sure. But we can also leverage our existing knowledge, and embrace the Cloud and containers ways with the help of some tools.
In this talk, I’ll create a simple URL shortener with a “standard” stack: Kotlin, JAX-RS and Hazelcast. Then, with the help of Quarkus and GraalVM, I’ll turn this application into a native executable with all Cloud/Container related work has been moved to the build process.
Devclub.lv - Introduction to stream processingNicolas Fränkel
While “software is eating the world”, those who are able to best manage the huge mass of data will emerge out on the top.
The batch processing model has been faithfully serving us for decades. However, it might have reached the end of its usefulness for all but some very specific use-cases. As the pace of businesses increases, most of the time, decision-makers prefer slightly wrong data sooner, than 100% accurate data later. Stream processing – or data streaming – exactly matches this usage: instead of managing the entire bulk of data, manage pieces of them as soon as they become available.
OSCONF Koshi - Zero downtime deployment with Kubernetes, Flyway and Spring BootNicolas Fränkel
Kubernetes allows a lot. After discovering its features, it’s easy to think it can magically transform your application deployment process into a painless no-event. For Hello World applications, that is the case. Unfortunately, not many of us do deploy such applications day-to-day. You need to think about application backward compatibility, possible rollback, database schema migration, etc. I believe the later is one of the biggest pain point. In this talk, I’ll demo how to update a Spring Boot app deployed on a Kubernetes cluster with a non-trivial database schema migration with the help of Flyway, while keeping the service up during the entire update process.
JOnConf - A CDC use-case: designing an Evergreen CacheNicolas Fränkel
This document discusses using change data capture (CDC) and Hazelcast Jet to build an evergreen cache that remains in sync with a database. It covers alternatives to cache invalidation like polling and triggers, introduces CDC and the Debezium implementation, and proposes a Jet job that watches database change events, analyzes them, and updates the cache accordingly to solve the cache freshness problem.
London In-Memory Computing Meetup - A Change-Data-Capture use-case: designing...Nicolas Fränkel
When one’s app is challenged with poor performances, it’s easy to set up a cache in front of one’s SQL database. It doesn’t fix the root cause (e.g. bad schema design, bad SQL query, etc.) but it gets the job done. If the app is the only component that writes to the underlying database, it’s a no-brainer to update the cache accordingly, so the cache is always up-to-date with the data in the database.
Things start to go sour when the app is not the only component writing to the DB. Among other sources of writes, there are batches, other apps (shared databases exist, unfortunately), etc. One might think about a couple of ways to keep data in sync i.e. polling the DB every now and then, DB triggers, etc. Unfortunately, they all have issues that make them unreliable and/or fragile.
In this talk, I will describe an easy-to-setup architecture that leverages CDC to have an evergreen cache.
This talk will be about the reasons behind the new stream processing model, how it compare to the old batch model, what are their pros and cons, and a list of existing technologies implementing stream processing with their most prominent characteristics. It will contain details of one possible use-case of data streaming that is not possible with batches: display in (near) real-time all trains in Switzerland and their position on a map, beginning with an overview of all the requirements and the design. Finally, using an OpenData endpoint and the Hazelcast platform,showing a working demo implementation of it.
Java.IL - Your own Kubernetes controller, not only in Go!Nicolas Fränkel
In Kubernetes, operators allow the API to be extended to your heart content. If one task requires too much YAML, it’s easy to create an operator to take care of the repetitive cruft, and only require a minimum amount of YAML.
On the other hand, since its beginnings, the Go language has been advertised as closer to the hardware, and is now ubiquitous in low-level programming. Kubernetes has been rewritten from Java to Go, and its whole ecosystem revolves around Go. For that reason, It’s only natural that Kubernetes provides a Go-based framework to create your own operator. While it makes sense, it requires organizations willing to go down this road to have Go developers, and/or train their teams in Go. While perfectly acceptable, this is not the only option. In fact, since Kubernetes is based on REST, why settle for Go and not use your own favorite language?
In this talk, I’ll describe what is an operator, how they work, how to design one, and finally demo a Java-based operator that is as good as a Go one.
The document discusses stream processing and provides an overview of Hazelcast Jet. It begins with explaining why streaming is useful and describes different streaming approaches like event-driven programming. It then provides details on Hazelcast Jet, including its concepts of pipelines and jobs. The document also discusses open data standards like GTFS and demonstrates a sample streaming pipeline that enriches public transportation data from open APIs.
London Java Community - An Experiment in Continuous Deployment of JVM applica...Nicolas Fränkel
A couple of years ago, continuous integration in the JVM ecosystem meant Jenkins. Since that time, a lot of other tools have been made available. But new tools don’t mean new features, just new ways. Besides that, what about continuous deployment? There’s no tool that allows deploying new versions of a JVM-based application without downtime. The only way to achieve zero downtime is to have multiple nodes deployed on a platform, and let that platform achieve that e.g. Kubernetes.
And yet, achieving true continuous deployment of bytecode on one single JVM instance is possible if one changes one’s way of looking at things. What if the compilation could be seen as changes? What if those changes could be stored in a data store, and a listener on this data store could stream those changes to the running production JVM via the Attach API?
In this talk, we'll demo exactly that using Hazelcast and Hazelcast Jet - but it’s possible to re-use the principles that will be shown using other streaming technologies.
OSCONF - Your own Kubernetes controller: not only in GoNicolas Fränkel
This document discusses creating Kubernetes operators and controllers using different programming languages besides Go. It suggests that a Java-based controller is possible using the GraalVM, which allows creating native executables from Java bytecode. Key points covered include what controllers and operators are, that no specific technology stack is required, and that the JVM could be a good option for controller development with GraalVM's support for polyglot programming and creating native applications.
vKUG - Migrating Spring Boot apps from annotation-based config to FunctionalNicolas Fränkel
Migrating Spring Boot apps from annotation-based config to Functional with Kotlin - Nicolas Fränkel
In the latest years, there has been some push-back against frameworks, and more specifically annotations: some call them magic. Obviously, they make understanding the flow of the application harder.
Spring and Spring Boot latest versions go along this trend, by offering an additional way to configure beans with explicit code instead of annotations. It’s declarative in the sense it looks like configuration, though it’s based on Domain-Specific Language(s). This talk aims to demo a step-by-step process to achieve that.
Top 9 Trends in Cybersecurity for 2024.pptxdevvsandy
Security and risk management (SRM) leaders face disruptions on technological, organizational, and human fronts. Preparation and pragmatic execution are key for dealing with these disruptions and providing the right cybersecurity program.
SOCRadar's Aviation Industry Q1 Incident Report is out now!
The aviation industry has always been a prime target for cybercriminals due to its critical infrastructure and high stakes. In the first quarter of 2024, the sector faced an alarming surge in cybersecurity threats, revealing its vulnerabilities and the relentless sophistication of cyber attackers.
SOCRadar’s Aviation Industry, Quarterly Incident Report, provides an in-depth analysis of these threats, detected and examined through our extensive monitoring of hacker forums, Telegram channels, and dark web platforms.
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
E-Invoicing Implementation: A Step-by-Step Guide for Saudi Arabian CompaniesQuickdice ERP
Explore the seamless transition to e-invoicing with this comprehensive guide tailored for Saudi Arabian businesses. Navigate the process effortlessly with step-by-step instructions designed to streamline implementation and enhance efficiency.
Hand Rolled Applicative User ValidationCode KataPhilip Schwarz
Could you use a simple piece of Scala validation code (granted, a very simplistic one too!) that you can rewrite, now and again, to refresh your basic understanding of Applicative operators <*>, <*, *>?
The goal is not to write perfect code showcasing validation, but rather, to provide a small, rough-and ready exercise to reinforce your muscle-memory.
Despite its grandiose-sounding title, this deck consists of just three slides showing the Scala 3 code to be rewritten whenever the details of the operators begin to fade away.
The code is my rough and ready translation of a Haskell user-validation program found in a book called Finding Success (and Failure) in Haskell - Fall in love with applicative functors.
Everything You Need to Know About X-Sign: The eSign Functionality of XfilesPr...XfilesPro
Wondering how X-Sign gained popularity in a quick time span? This eSign functionality of XfilesPro DocuPrime has many advancements to offer for Salesforce users. Explore them now!
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Mobile app Development Services | Drona InfotechDrona Infotech
Drona Infotech is one of the Best Mobile App Development Company In Noida Maintenance and ongoing support. mobile app development Services can help you maintain and support your app after it has been launched. This includes fixing bugs, adding new features, and keeping your app up-to-date with the latest
Visit Us For :
Mobile App Development Company In Noida | Drona InfotechDrona Infotech
Drona Infotech is a premier mobile app development company in Noida, providing cutting-edge solutions for businesses.
Visit Us For : https://www.dronainfotech.com/mobile-application-development/
When it is all about ERP solutions, companies typically meet their needs with common ERP solutions like SAP, Oracle, and Microsoft Dynamics. These big players have demonstrated that ERP systems can be either simple or highly comprehensive. This remains true today, but there are new factors to consider, including a promising new contender in the market that’s Odoo. This blog compares Odoo ERP with traditional ERP systems and explains why many companies now see Odoo ERP as the best choice.
What are ERP Systems?
An ERP, or Enterprise Resource Planning, system provides your company with valuable information to help you make better decisions and boost your ROI. You should choose an ERP system based on your company’s specific needs. For instance, if you run a manufacturing or retail business, you will need an ERP system that efficiently manages inventory. A consulting firm, on the other hand, would benefit from an ERP system that enhances daily operations. Similarly, eCommerce stores would select an ERP system tailored to their needs.
Because different businesses have different requirements, ERP system functionalities can vary. Among the various ERP systems available, Odoo ERP is considered one of the best in the ERp market with more than 12 million global users today.
Odoo is an open-source ERP system initially designed for small to medium-sized businesses but now suitable for a wide range of companies. Odoo offers a scalable and configurable point-of-sale management solution and allows you to create customised modules for specific industries. Odoo is gaining more popularity because it is built in a way that allows easy customisation, has a user-friendly interface, and is affordable. Here, you will cover the main differences and get to know why Odoo is gaining attention despite the many other ERP systems available in the market.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
9. COMPUTING CODE COVERAGE
CC =
Lexecuted
Ltotal
*100
CC: Code Coverage
(in percent)
Lexecuted: Number of
executed lines of code
Ltotal: Number of total
lines of code
@nicolas_frankel #mutationtesting
11. 100% CODE COVERAGE?
@nicolas_frankel #mutationtesting
“Is 100% code coverage
realistic? Of course it is. If you
can write a line of code, you can
write another that tests it.”
Robert Martin (Uncle Bob)
https://twitter.com/unclebobmarti
n/status/55966620509667328
12. ASSERT-LESS TESTING
@Test
public void add_should_add() {
new Math().add(1, 1);
}
@nicolas_frankel #mutationtesting
But, where is the
assert?
As long as the Code Coverage is
OK…
13. CODE COVERAGE AS A MEASURE OF QUALITY
@nicolas_frankel #mutationtesting
Any metric can be gamed!
Code coverage is a metric…
⇒ Code coverage can be
gamed
• On purpose
• Or by accident
14. CODE COVERAGE AS A MEASURE OF QUALITY
@nicolas_frankel #mutationtesting
Code Coverage lulls you into
a false sense of security…
15. THE PROBLEM STILL STANDS
@nicolas_frankel #mutationtesting
Code coverage cannot
ensure test quality
• Is there another way?
Mutation Testing to the
rescue!
17. public class Math {
public int add(int i1, int i2) {
return i1 + i2;
}
}
@nicolas_frankel #mutationtesting
public class Math {
public int add(int i1, int i2) {
return i1 - i2;
}
}
21. KILLED OR SURVIVING?
@nicolas_frankel #mutationtesting
Surviving means changing the
source code did not change the test
result
• It’s bad!
Killed means changing the source
code changed the test result
• It’s good
22. TEST THE CODE
@nicolas_frankel #mutationtesting
✔Execute Test
public class Math {
public int add(int i1, int i2) {
return i1 - i2;
}
}
@Test
public void add_should_add() {
new Math().add(1, 1);
}
23. ✔Execute Test
SURVIVING MUTANT
@nicolas_frankel #mutationtesting
public class Math {
public int add(int i1, int i2) {
return i1 - i2;
}
}
@Test
public void add_should_add() {
new Math().add(1, 1);
}
24. TEST THE CODE
@nicolas_frankel #mutationtesting
@Test
public void add_should_add() {
int sum = new Math().add(1, 1);
Assert.assertEquals(sum, 2);
}
✔Execute Test
public class Math {
public int add(int i1, int i2) {
return i1 - i2;
}
}
25. KILLED MUTANT
@nicolas_frankel #mutationtesting
✗Execute SAME Test
@Test
public void add_should_add() {
int sum = new Math().add(1, 1);
Assert.assertEquals(sum, 2);
}
public class Math {
public int add(int i1, int i2) {
return i1 - i2;
}
}
26. MUTATION TESTING IN JAVA
@nicolas_frankel #mutationtesting
PIT is a tool for Mutation
testing
Available as
• Command-line tool
• Ant target
• Maven plugin
28. PIT MUTATORS SAMPLE
Name Example source Result
Conditionals Boundary > >=
Negate Conditionals == !=
Remove Conditionals foo == bar true
Math + -
Increments foo++ foo--
Invert Negatives -foo foo
Inline Constant static final FOO= 42 static final FOO = 43
Return Values return true return false
Void Method Call System.out.println("foo")
Non Void Method Call long t = System.currentTimeMillis() long t = 0
Constructor Call Date d = new Date() Date d = null;
@nicolas_frankel #mutationtesting
36. WHY SO SLOW?
@nicolas_frankel #mutationtesting
Analyze test code
For each class under test
• For each mutator
• Create mutation
• For each mutation
• Run test
• Analyze result
• Aggregate results
37. WORKAROUNDS
Increase number of threads
Set a limited a set of mutators
Limit scope of target classes
Limit number of tests
Limit dependency distance
Use incremental analysis
Don’t bind to the test phase
Use scmMutationCoverage
38. INCREMENTAL ANALYSIS
Metadata stored between runs
Mutant will not be checked again, if:
• timed out, and class has not changed
• killed, and neither class nor test have changed
• survived, and there are no new/changed tests for it
@nicolas_frankel #mutationtesting
40. THE REST IS UP TO YOU
@nicolas_frankel #mutationtesting
Validate the assembled application
• Integration Testing
Check the performance
• Performance Testing
Look out for display bugs
• End-to-end testing
Etc.
41. TESTING IS ABOUT ROI
@nicolas_frankel #mutationtesting
Don’t test to achieve 100%
coverage
Test because it saves money
in the long run
Prioritize:
• Business-critical code
• Complex code