Unfortunately, I can not help you with your problem. I think it would be interesting to see what is the solution. As long as I have been following this forum, which is already a few years, questions have been rarely answered to unit tests. I do not know at what it is. It is a pity, because I think that unit testing is a very important thing. It is great that we have a tool with SQL Developer that allows unit tests for PL / SQL. But somehow, the experts seem to be missing in this context. You'll look and probably have to fight alone. But if you can find a solution, it would be nice if you would share in this forum.
I created a unit test for a function with date parameters. The validation queries should use these date parameter values.
Ok - but can you see why 18-09-14 might not get interpreted as a date?
What is 18 minus 09? Then subtract 14 and what do you get?
If that is a 'date' then what is the year? is it: 1) 1918? 2) 2018? 3) 1914? 4) 2014? 5) 1909? 6) 2009?
How would Oracle, you, or anyone know where the year, month or day are?
The MOST COMMON cause of such 'date' issues is the default date format you are using.
Use YY-MM-DD and you get one value: September 14 of some year. Use DD-MM-YY and get another: September 18 of a different year. Use MM-DD-YY and get an invalid month of 18.
If you have to use strings use full year (2016) and a month abbreviation (e.g. SEP) in the value you provide. And change your default date format the same way: YYYY-MON-DD.
Thanks for your responds.
I can only support your observation because all my issues have had no responses although some of them where solved in updates of sqldeveloper.
Hope they continue with the bug repair because it is a great tool.
Thanks for your responds rp0428,
Ofcourse I am aware of the possibility that the date format can be interpreted as an numerical expression. So I entered the value with the date picker.
And because the type of the parameters is known to the unit test the value should be interpreted as a date and not as an numerical value.
So I entered the value with the date picker.
Then that would be a bug and you should report it via your MOS account.