testsigma icon indicating copy to clipboard operation
testsigma copied to clipboard

[Bug]: Test Data Function class "DateFunctions" not found while executing test data custom function "dateAfterToday"

Open fafane opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What is the current behavior?

I tried to run a test using !|DateFunctions :: DateAfterToday| with the following parameters : 1 and dd/MM/yyyy Unfortunately, the execution gives this error : Test Data Function class "DateFunctions" not found while executing test data custom function "dateAfterToday"

What is the expected behavior?

The input field has a date after today

Steps To Reproduce

Create a Test Case with a step using Data Generator Select DateFunctions DateAfterToday and Fill the parameters with 1 and dd/MM/yyyy Launch the test and you will get this error for the step : Test Data Function class "DateFunctions" not found while executing test data custom function "dateAfterToday"

Version

Testsigma Community Edition

fafane avatar Jul 24 '24 16:07 fafane

We will check and fix this

amitsavyasachi avatar Jul 25 '24 10:07 amitsavyasachi

After some digging, the problem seems to be with server/src/main/resources/db/bootstrap/V215__bootstrap_test_data_function_files.sql. The field class_package for DateFunctions should be com.testsigma.automator.testdata.functions and not com/testsigma/customfunc... If you update the field in the table default_data_generator_files, you don't have the error anymore.

fafane avatar Aug 12 '24 12:08 fafane

Noted. @fafane We will go though this and make changes in the code to fix it.

amitsavyasachi avatar Aug 14 '24 04:08 amitsavyasachi