proxyman-windows-linux
proxyman-windows-linux copied to clipboard
Network Condition: Unit Test #5
Description
Unit Tests 1
- [x] Test there is only one rule is enabled at a time.
- Setup 5 rules
- Enable the second rule
Expect: Get the active rule -> It's the second rule
Unit Tests 2
- [x] Test System-wide rule with 100% loss
- Setup a rule
- Start the core
- Visit
httpbin.proxyman.app
Expect: The request is a timeout after 30 seconds ✅ . If the connection is closed -> It's failed.
Unit Tests 3
- [x] Test a rule with 3G Profile
- Setup a rule with host =
httpbin.proxyman.app, profile = 3G - Start the core
- Make a request to
httpbin.proxyman.app-> Verify we can get the request after 5 seconds. If we get a response less than 1 second -> It means the Network Condition doesn't work. - Make a request to
www.google.com-> Verify we can get a response after 1 second.
Unit Test 4
- Write some similar Unit Tests to cover some cases.