2024
Mentors: Giannis Skitsas, Marios Karagiannopoulos
Assignee: Yujun Liu
Abstract
Flexbench, initially forked from the http-traffic-simulator npm package, has undergone significant enhancements. The initial development during GSoC 2022 transformed the package into a stand-alone desktop application and web server with API exposure. My work during GSoC 2024 further advances Flexbench by implementing a robust data anonymization feature, integrating OpenAPI support for streamlined API interactions, and addressing various UI/UX improvements for the desktop app to ensure a more intuitive user experience.
Main goals for GSoC 2024
The three primary goals for this summer were:
- Enhance and fix aesthetic and UI/UX bugs: Improve the overall user experience and visual consistency of the desktop app.
- Research and implement anonymization features: Secure sensitive user data during testing.
- Integrate OpenAPI support: Streamline and standardize API interactions.
Implementation
Desktop-App Enhancements
1. Bug Fixes and UI/UX Improvements
- Identified and Resolved Aesthetic Bugs: reviewed of the desktop application's user interface, identifying and fixing several visual inconsistencies.
- Enhanced User Experience: Implemented improvements based on user feedback to ensure a more intuitive and seamless interaction within the application.
- Fixed Main Process Running Bug: Addressed a critical bug in the main process of the application that caused unexpected crashes and performance issues.
Documentation
1. Comprehensive Documentation Update
- Updated User Guides: Revised and expanded the user documentation to reflect the latest features and changes in the desktop app.
- Technical Documentation: Added detailed technical documentation for developers, covering the architecture, key modules, and APIs of the application.
OpenAPI Support
1. Integration of OpenAPI Module
- OpenAPI Document Parsing: Integrated an OpenAPI module capable of parsing OpenAPI (Swagger) documents. This module reads the API specifications and extracts details such as endpoints, request methods, parameters, and data schemas.
- Automated Scenario Generation: Developed features that utilize the parsed OpenAPI data to automatically generate realistic scenarios for testing. This includes generating
.flex
scenarios andcurl
commands that can be directly used within Flexbench. - MachineLearning/Static: Integrate two different approach for realistic simulation data generation: Faker(field-mapping) / OpenAI API(OpenAI Client)
- Support for Various OpenAPI Formats: Ensured compatibility with different versions and formats of OpenAPI documents, including both YAML and JSON. This flexibility allows Flexbench to be used with a wide range of API specifications.
- Mock Server Integration with Prism: Implemented a mock server using Prism, which can simulate API responses based on the OpenAPI specification. This feature enables developers to test their API clients against predefined responses, improving the reliability of the scenarios.
Anonymization Feature
1. Development of Data Anonymization Module
- Comprehensive Anonymization Support: Implemented an anonymization module that supports a wide variety of data types, including names, emails, addresses, phone numbers, and more. This module ensures that sensitive information is obfuscated before being logged or displayed, protecting user privacy.
- Configurable Anonymization Settings: Added options for enabling or disabling anonymization, as well as manual mode settings that allow developers to define custom anonymization rules. This flexibility makes it easier to tailor the anonymization process to specific needs.
- Real-time Request and Response Anonymization: Integrated anonymization directly into the request and response handling processes. This ensures that all data passing through the application is anonymized in real time, providing robust protection against accidental data leaks.
- Detailed Error Handling and Logging: Included comprehensive error handling within the anonymization module to catch and log any issues that arise during the anonymization process. This ensures that the module can be debugged and maintained effectively.
- Documentation for Anonymization Module: Provided thorough documentation on how to use and extend the anonymization module, including examples and best practices. This documentation serves as a guide for future developers to maintain and enhance the module.
Repository
The original repository for this project can be found here
- All pull requests for GSoC 2024 can be found here.
- For the implementation Git Flow was used and all Pull Requests target the develop branch.
Quick Start
During the GSoC period work was done to easily set up a development environment and to quickly deploy the server app with docker-compose. A quickstart for both could be:
- Development: Setup development environment as described.
- Production: Setup a quick production build with Docker as described.
In addition, the current site was built from scratch to support structured and extensive documentation. This site's source code is committed to the Git repository of this project.
Pull Requests
Aesthetic and UI/UX engancements #75
This PR fixed aesthetic and UI/UX for destop-app
- Finding the bugs for aesthetic and UI/UX/Fixing main process running bug
Anonymization in/out #76
This PR adds the anonymization feature
- Anonymization Report/implementation
GSoC2024 Documentation Updates #90
This PR update the GSoC section of Flexbench github documentation website
- updating the general documentation for GSoC 2024
Implemented MANUAL mode to anonymization feature #92
This PR includes - fixes for issues #79
- Added config-driven manual mode to anonymization feature
OpenAPI Integration Module 1.0.0 #93
This PR adds the OpenAPI integration module to Flexbench
- This PR included the OpenAPI Module for issues #81 #82 #83 #84 #85 #86 #87 #88 #89 and parent issue #72 .