How to Run a New Code Project With Mayhem in 5 Easy Steps
Welcome to Mayhem! In this blog post, we will walk you through the process of launching a new code project using Mayhem's powerful tools and features. Mayhem is designed to analyze your code, identify defects, and provide comprehensive testing results.
Whether you're a beginner or an experienced developer, Mayhem simplifies the code analysis and testing process, allowing you to ensure the quality and stability of your projects. Let's get started!
If you don't yet have a Mayhem account, our Getting Started guide can show you how to quickly set one up.
Running an API project? Learn how to complete your first API run here.
Step 1: Logging in and Navigating the Dashboard
Upon logging into Mayhem, you will be greeted by the dashboard interface. To begin launching your code project, you have two options: either select "New Project" located in the corner or navigate directly to the "Analyze your code" section of the dashboard.
Step 2: Adding Code and Choosing Settings
To add your code to Mayhem, click on the "Add Code" button. Once the code is added, you will be presented with three options at the top: "Basic," "Command," and "Advanced." These options allow you to customize various settings for your project.
If you prefer to keep things simple, the basic settings are already preset for you. However, if you wish to modify the settings, feel free to explore the "Command" and "Advanced" options.
You can name your project according to your preference. At this point, you should also check to make sure that your Docker image and commands are correctly set up. Mayhem offers the flexibility to choose the level of customization that suits your needs.
Step 3: Initiating the Code Run
For the purpose of this guide, we will proceed with a quick run that typically takes about 5 to 6 minutes. Click on the "Create project and run" button to initiate the code analysis and testing process.
Note: Alternatively, you can also install the Mayhem CLI (Command Line Interface) and create a project from the section of code below.
Step 4: Reviewing the Findings
The code run should take about five to six minutes. Once the code run is completed, Mayhem presents you with next steps and a summary of the defects that have been found. The dashboard will display the completed tasks, timeline, and analysis section, where you can explore the detailed findings.
Mayhem allows you to filter the results to show regression testing and behavior testing outcomes. It will also provide insights into the test cases that were processed and the defects identified. By scrolling down, you can view the specifics of the defects and even filter for crashes if any occurred during the code run.
Step 5: Analyzing Code Coverage and Downloading Reports
By scrolling down, you will find a “Coverage” section of the dashboard where you can review the amount of coverage achieved during the code run. Additionally, Mayhem provides the option to download the analysis and findings as a file for future reference and collaboration purposes. To do this, click the blue download button in the upper right corner of the coverage section of the dashboard.
You’ve Completed Your First Code Run With Mayhem!
Congratulations! You have successfully completed your first code run with Mayhem. By following the steps outlined in this guide, you have learned how to launch a new code project and leverage Mayhem's powerful features for code analysis and defect identification.
Mayhem simplifies the process of analyzing and testing code, enabling developers to focus on creating software without worrying about taking on the tedious process of security testing. With its intuitive interface and comprehensive reporting, Mayhem makes AppSec an easy part of the process.
Start your journey with Mayhem today and experience the benefits of streamlined code analysis and testing.
{{code-cta}}
Add Mayhem to Your DevSecOps for Free.
Get a full-featured 30 day free trial.