Subject: | test in 02-generic.t incorrect? |
HTTP-WebTest-2.01 fails in nmake test (Windows 2000). Test case may be incorrect. Test code is:
# 5: run content size checks
{
my $tests = [ ( url => abs_url($URL, '/test-file1'),
min_bytes => 10,
max_bytes => 100 },
{ url => abs_url($URL, '/test-file2'),
min_bytes => 10,
max_bytes => 100 },
{ url => abs_url($URL, '/test-file1'),
min_bytes => 100,
max_bytes => 50000 },
{ url => abs_url($URL, '/test-file2'),
min_bytes => 100,
max_bytes => 50000 }
];
check_webtest(webtest => $WEBTEST,
server_url => $URL,
tests => $tests,
check_file => 't/test.out/size');
}
According to the test results, test-file1 is 52 bytes and test-file2 is 14138. If this is correct, then the second and third parts of this test should fail (failure should be a positive result), but this is not the case.
Results for parts 2 and 3:
Test Name: N/A
URL: http://http.web.test/test-file2
STATUS CODE CHECK
Expected '200' and got: 200 OK SUCCEED
CONTENT SIZE CHECK
Number of returned bytes ( 14138 ) is > or = 10 ? SUCCEED
Number of returned bytes ( 14138 ) is < or = 100 ? FAIL
Test Name: N/A
URL: http://http.web.test/test-file1
STATUS CODE CHECK
Expected '200' and got: 200 OK SUCCEED
CONTENT SIZE CHECK
Number of returned bytes ( 52 ) is > or = 100 ? FAIL
Number of returned bytes ( 52 ) is < or = 50000 ? SUCCEED
Parts 1 and 4 succeed.
Please let me know if I have misunderstood this test.