VIPTest: Rapid Application Testing for F5 Environments
The Motivation Behind VIPTest
As an F5 Solutions Architect, I noticed a recurring challenge with prospective customers: there was no quick way to "grade" the success of migrating from their current environment to F5 solutions. This gap made it difficult to quickly identify and address problem areas. To solve this, I developed VIPTest - a tool designed as a convenience for anyone considering moving their applications from a different vendor solution (e.g., Citrix NetScaler) to F5.
However, VIPTest's utility extends far beyond migration scenarios. It can be used in any environment where you introduce a change and need an automated process to assess the success of these changes. Whether you're upgrading software, modifying configurations, or performing routine maintenance, VIPTest provides a rapid, comprehensive snapshot of your application landscape.
F5's Application Services and Security Solutions
Before we dive into VIPTest, let's briefly explore F5's three new families of Application Services and Security solutions:
-
F5 Distributed Cloud (XC): A SaaS-based security, networking, and application management solution that provides multi-cloud networking, web application and API protection, and edge-based computing.
-
BIG-IP Next: The next generation of F5's flagship product, offering advanced traffic management, security, and analytics in a more flexible, software-first architecture.
-
NGINX: A suite of cloud native technologies that provide API gateway, reverse proxy, and application security, known for its high performance and scalability.
With VIPTest, you can confidently introduce changes to any of these solutions and quickly assess their impact. It's equally valuable for evaluating initial migrations and for ongoing operational changes within the same solution.
The Problem VIPTest Solves
Customers often lack a quick, automated way to assess the impact of environment changes on their applications. VIPTest addresses this by providing:
- Fast, concurrent testing of multiple URLs
- Pre and post-change comparisons
- Detection of improvements (e.g., TLS upgrades, HTTP/1.1 to HTTP/2 upgrades) and issues (e.g., broken connectivity)
- Identification of deprecated applications so you don't wast time testing 'dead' URLs
- Rapid assessment when migrating from another vendor's solution, such as Citrix NetScaler
- A simple mechanism to target just a staging environment during testing by overriding system DNS with static IP entries
Let's explore how VIPTest works and how you can leverage it in your F5 environment.
How VIPTest Works
VIPTest, available on GitHub, accepts a CSV file containing URLs and IP addresses. It then:
- Validates URLs and IP addresses
- Performs HTTP/HTTPS requests
- Checks TLS versions and ciphers
- Tests connectivity (ping and telnet)
- Reports results for easy comparison
Key Features
-
Concurrent Processing: VIPTest uses Python's multiprocessing module to test as many URLs simultaneously as your client machine can support. On my modest Intel 10th gen / 6 Core laptop, I can test 1000 URLs in less than one minute.
-
Flexible URL Handling: It supports various URL formats, including:
- Full URLs (http://example.com)
- IP addresses with ports (192.168.1.1:80)
- URLs with custom ports (https://example.com:8443)
-
Detailed Reporting: VIPTest provides information on:
- HTTP response codes
- TLS versions and ciphers
- IP resolution
- Connectivity status
VIPTest works with Linux, Windows (WSL2), and MacOS (Zsh using homebrew).
Setting Up VIPTest
See README.md for full installation and useage details.
-
Ensure you have Python 3.8+ installed:
python3 --version
-
Create a virtual environment:
python3 -m venv myenv source myenv/bin/activate
-
Clone the VIPTest repository:
git clone https://github.com/tmarfil/viptest.git cd viptest
-
Install requirements:
pip3 install -r requirements.txt
-
Make viptest.py executable:
chmod +x viptest.py
Using VIPTest
-
Create a CSV file with your URLs (see README.md for format details).
-
Run VIPTest:
viptest.py --csv your_file.csv -c 50
This tests URLs concurrently using 50 processes.
-
Save the output:
viptest.py --csv your_file.csv -c 50 > pre_change_results.log
-
Make your environment changes.
-
Run VIPTest again:
viptest.py --csv your_file.csv -c 50 > post_change_results.log
-
Compare results:
diff pre_change_results.log post_change_results.log
The Power of HTTPX
VIPTest leverages the HTTPX client for Python3:
- HTTP/2 Support: Enables testing of modern application stacks.
- Automatic Retries: Improves reliability in unstable network conditions.
- Connection Pooling: Enhances performance for multiple requests to the same host.
- Timeout Handling: Prevents hung requests from slowing down the entire test suite.
Concurrent Testing with Multiprocessing
The Python multiprocessing package is crucial for VIPTest's performance. Here's how it works:
- The URL list is divided into chunks.
- Each chunk is processed by a separate Python process.
- Results are collected in a shared queue.
This approach allows VIPTest to test one thousand URLs in less than one minute. The Python code implements this using:
if args.concurrent:
chunk_size = len(urls) // args.concurrent
chunks = list(chunked_iterable(urls, chunk_size))
processes = []
for chunk in chunks:
p = multiprocessing.Process(target=process_urls, args=(chunk, output_queue, counter))
processes.append(p)
p.start()
Automating with CI/CD
Integrating VIPTest into your CI/CD pipeline ensures consistent testing. Here's a basic GitHub Actions workflow:
name: VIPTest
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run VIPTest
run: |
viptest.py --csv testfile.csv -c 50 > test_results.log
- name: Upload results
uses: actions/upload-artifact@v2
with:
name: test-results
path: test_results.log
This workflow runs VIPTest on every push to the main branch or pull request, saving the results as an artifact.
For GitLab users, a similar pipeline can be created using .gitlab-ci.yml:
stages:
- test
viptest:
stage: test
image: python:3.12
script:
- pip install -r requirements.txt
- viptest.py --csv testfile.csv -c 50 > test_results.log
artifacts:
paths:
- test_results.log
Conclusion
VIPTest empowers F5 customers to confidently make environment changes across all F5 solutions - from Distributed Cloud (XC) to BIG-IP Next and NGINX. By providing quick, comprehensive application testing, it reduces risk and improves the success rate of migrations, upgrades, and day-to-day operations. Whether you're moving from a competitor's solution or optimizing your current F5 setup, VIPTest is an invaluable tool in your toolkit.
Start using VIPTest today to ensure your applications stay healthy through every environment change!
- Aswin_mkCumulonimbus
It's really interesting. I hope vip test we can use for auditing current BIG Ip hosted application vulnerability findings and cheking delay in application performance.
- JRahmAdmin
Love it, Tony_Marfil , thanks for the new toy!