proxyman-windows-linux icon indicating copy to clipboard operation
proxyman-windows-linux copied to clipboard

Network Condition: Unit Test #5

Open NghiaTranUIT opened this issue 2 years ago • 0 comments

Description

Unit Tests 1

  • [x] Test there is only one rule is enabled at a time.
  1. Setup 5 rules
  2. 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
  1. Setup a rule
  2. Start the core
  3. 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
  1. Setup a rule with host = httpbin.proxyman.app, profile = 3G
  2. Start the core
  3. 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.
  4. 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.

NghiaTranUIT avatar Oct 30 '23 06:10 NghiaTranUIT