Hi Dymitry, Found the culprit anyway.
Data = boss_db:find(caller, [{tname, 'equals', "player1"}] should be Data = boss_db:find(caller, [{tname, 'equals', list_to_binary("player1")}] With this changes, the functional test working as expected, no error 500 anymore. but i wonder how to see the error message trace in func test? it not show the stack, but it seems use the production setup which look for the 500 error tempate. I have 500 error handling function, and when i disable it to make CB use default 500 error, it complain no 500 error template setup. so i am in the dark try to figure out why functional test and dev code test manually are different result. Is this expected to be a binary data feed to the boss_db find on functional test. Hope this helps with other using the test driven development with CB :). Thanks On Sunday, 11 February 2018 00:38:36 UTC+8, Dmitry Polyanovsky wrote: > > Please post your test code. Stacktrace could help too. > > On Feb 10, 2018 18:28, "Phang Mulianto" <brav...@gmail.com <javascript:>> > wrote: > >> Hi, >> >> i have a situation where my code working on manual access , but in test >> it fails. >> >> The code was to find a record in db, with postgresql. >> >> my code use 'equals' to find the records. >> >> Data = boss_db:find(caller, [{tname, 'equals', "player1"}] >> >> When i access via browser, the records returned. But when running test , >> its fail with 500 errors. >> >> anyone experience this? or this is caused by testing using mock and dev >> using postgresql as db? >> >> Thanks >> >> -- >> You received this message because you are subscribed to the Google Groups >> "ChicagoBoss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to chicagoboss...@googlegroups.com <javascript:>. >> Visit this group at https://groups.google.com/group/chicagoboss. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/chicagoboss/bb64ec29-6ca0-46eb-961e-80e45a5b9365%40googlegroups.com >> >> <https://groups.google.com/d/msgid/chicagoboss/bb64ec29-6ca0-46eb-961e-80e45a5b9365%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- You received this message because you are subscribed to the Google Groups "ChicagoBoss" group. To unsubscribe from this group and stop receiving emails from it, send an email to chicagoboss+unsubscr...@googlegroups.com. Visit this group at https://groups.google.com/group/chicagoboss. To view this discussion on the web visit https://groups.google.com/d/msgid/chicagoboss/db4a1af2-8f49-4ad9-a9d2-5cb90dab0500%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.