al-duss / js-test-driver

Automatically exported from code.google.com/p/js-test-driver
0 stars 0 forks source link

javascript code not getting re-executed on re-runs of tests #393

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the attached files for js code, test code and config
2. Launch the server and capture chrome browser
3. Launch the js-test-runner with --tests all --captureConsole
    Tests pass ok output is:
    >> Total 1 tests (Passed: 1; Fails: 0; Errors: 0)
4. Repeat step 3 (try repeating more than once if necessary - I have seen it 
succeed)
    Tests don't run, output is:
    >> Total 1 tests (Passed: 0; Fails: 0; Errors: 1) (0.00 ms)
  Chrome 20.0.1132.57 Windows: Run 1 tests (Passed: 0; Fails: 0; Errors 1) (0.00 ms)
    FoolMeOnceTest.test_Should_Not_Barf error (0.00 ms): "Fooled me twice, shame on me!"

What is the expected output? What do you see instead?
- I expect the tests to work every time. I expect the code in fool-me-once.js 
to get re-executed for a new test run.
- If I "modify" fool-me-once.js, it seems to get reloaded and re-executed, and 
so the tests will run ok. By modify I mean update the last-saved-timestamp.
- So it seems the framework is being clever and optimizing, i.e. deciding I 
don't need to re-execute the file js file.
- I want to run that test 10 times in a row and have it succeed each time. I 
don't want to have to change the timestamp between executions to force it to 
succeed.

What version of the product are you using? On what operating system?
Tried on a couple of versions
Tried on: js test runner 1.2.2 & 1.3.4.b
Windows 7 64 bit
Chrome browser (20.0.1132.57 m)

Please provide any additional information below.
Same error is reproducible in IE 9

Original issue reported on code.google.com by conor.j....@gmail.com on 17 Jul 2012 at 1:13

Attachments:

GoogleCodeExporter commented 8 years ago
P.S. You can add an alert("msg") call into the anonymous function (in 
fool-me-once.js) and see that is not getting called in the browser everytime. 
The alert only happens the first time, not every time.

Original comment by conor.j....@gmail.com on 17 Jul 2012 at 1:27

GoogleCodeExporter commented 8 years ago
Maybe not a defect?
Maybe I'm supposed to add the --reset arg?

Original comment by conor.j....@gmail.com on 17 Jul 2012 at 1:38