genericnickname:
We have to guess ? If you don't show your code, nobody can help you.
Hello,
I'm having trouble running my unit tests outside of the local environment. When I hit F5 on my UnitTestRunner.mq5, I get these results:
...
The code has not changed a bit! Any thought on this one?
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello,
I'm having trouble running my unit tests outside of the local environment. When I hit F5 on my UnitTestRunner.mq5, I get these results:
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) [OK] All asserts passed.
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) 32/32 asserts passed.
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) Took 109 ms.
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) MaximumFinderTest: Asserts: 1/1
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) GeneticAlgorithmTest: Asserts: 0/0
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) NeuralNetworkTest: Asserts: 12/12
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) NeuronLayerTest: Asserts: 3/3
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) SigmoidNeuronTest: Asserts: 1/1
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) NeuronTest: Asserts: 2/2
2013.09.04 13:21:36 UnitTestRunner (EURUSD,H1) DefaultTest: Asserts: 13/13
However, when I run the same code inside of an Expert Advisor with the Strategy Tester, this is the result:
2013.09.04 13:23:26 Core 1 connection closed
2013.09.04 13:23:26 Core 1 log file "C:\Users\Daniel\AppData\Roaming\MetaQuotes\Tester\DAD3B8CC3EAC09C0C9725021DF0C7A65\Agent-127.0.0.1-3000\logs\20130904.log" written
2013.09.04 13:23:26 Core 1 tester stopped because OnInit failed
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 OnDeinit
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 Unit tests failed. Exiting ...
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 [FAIL] Not all asserts passed.
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 26/32 asserts passed.
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 Took 0 ms.
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 MaximumFinderTest: Asserts: 0/1
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 MaximumFinderTest: assert: maximum finder didn't return expected results.
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 GeneticAlgorithmTest: Asserts: 0/0
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuralNetworkTest: Asserts: 9/12
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuralNetworkTest: assertEqual: wrong outcome: -1.#INF0000 not equal to 2.00000000
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuralNetworkTest: assert: test failed.
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuralNetworkTest: assert: bias failed to put correctly
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuronLayerTest: Asserts: 3/3
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 SigmoidNeuronTest: Asserts: 1/1
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 NeuronTest: Asserts: 2/2
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 DefaultTest: Asserts: 11/13
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 DefaultTest: assertEqual: equality test failed: [17976931348623157000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 DefaultTest: assertEqual: equality test failed: 0 not equal to 549
2013.09.04 13:23:26 Core 1 2013.07.01 00:00:00 OnInit
2013.09.04 13:23:26 Core 1 Inp_Expert_Title=Stubborn
2013.09.04 13:23:26 Core 1 EURUSD,H1: testing of Experts\Test\Stubborn.ex5 from 2013.07.01 00:00 to 2013.08.01 00:00 started with inputs:
2013.09.04 13:23:26 Core 1 EURUSD,H1 (MetaQuotes-Demo): 1 minutes OHLC ticks generating
2013.09.04 13:23:26 Core 1 EURUSD,H1: history begins from 2012.01.02 00:00
2013.09.04 13:23:26 Core 1 EURUSD,H1: history cache reserved for estimated 9908 bars
2013.09.04 13:23:26 Core 1 EURUSD,H1: contains 9259 bars of beginning data from 2012.01.02 00:00 to 2013.06.28 23:00
2013.09.04 13:23:26 Core 1 EURUSD: history synchronized from 2012.01.02 to 2013.08.30
2013.09.04 13:23:26 Core 1 EURUSD: load 27 bytes of history data to synchronize
2013.09.04 13:23:26 Core 1 EURUSD: symbol synchronized, 3304 bytes of symbol info received
2013.09.04 13:23:26 Core 1 EURUSD: symbol to be synchronized
2013.09.04 13:23:26 Core 1 Intel Core2 Quad Q6600 @ 2.40GHz, 8191 MB
2013.09.04 13:23:26 Core 1 153 Kb of total initialization data received
2013.09.04 13:23:26 Core 1 successfully initialized
2013.09.04 13:23:26 Core 1 initial deposit 10000.00 USD, leverage 1:100
2013.09.04 13:23:26 Core 1 file added: Files\DTrader1_fittestGenome_weights.bin. 484 bytes loaded
2013.09.04 13:23:26 Core 1 file added: Files\DTrader1_fittestGenome_bias.bin. 81 bytes loaded
2013.09.04 13:23:26 Core 1 expert file added: Experts\Test\Stubborn.ex5. 142827 bytes loaded
2013.09.04 13:23:26 Core 1 940 bytes of symbols list loaded
2013.09.04 13:23:26 Core 1 708 bytes of input parameters loaded
2013.09.04 13:23:26 Core 1 1490 bytes of tester parameters loaded
2013.09.04 13:23:26 Tester quality of analyzed history is 100%
2013.09.04 13:23:25 Core 1 common synchronization completed
2013.09.04 13:23:25 Tester EURUSD,H1 (MetaQuotes-Demo): testing of Experts\Test\Stubborn.ex5 from 2013.07.01 00:00 to 2013.08.01 00:00
2013.09.04 13:23:25 Core 1 authorized (agent build 842)
2013.09.04 13:23:25 Core 1 connected
2013.09.04 13:23:24 Core 1 connecting to 127.0.0.1:3000
2013.09.04 13:23:24 Core 1 agent process started
The code has not changed a bit! Any thought on this one?