testsigmahq / testsigma

A powerful open source test automation platform for Web Apps, Mobile Apps, and APIs. Build stable and reliable end-to-end tests @ DevOps speed.
https://testsigma.com
Apache License 2.0
895 stars 186 forks source link

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

Open fafane opened 1 month ago

fafane commented 1 month ago

Is there an existing issue for this?

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

amitsavyasachi commented 1 month ago

We will check and fix this

fafane commented 1 month ago

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.

amitsavyasachi commented 4 weeks ago

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