Forum Discussion

asavoia's avatar
asavoia
Occasional Contributor
5 years ago

csv file db table

Hello everybody,
do you know if it is possible through complete tests, to enter the csv / exel file, inserted as a dbtable variable, and make it perform a sorting of a column and then compare it with the sorting generated in the automatic test?

thanks to those who answer

  • sonya_m's avatar
    sonya_m
    5 years ago

    Thank you Marsha and Robert!

     

    Hi asavoia , did you try implementing this suggestion?

  • It wasn't quite clear - is your test generating another csv file?  Why not sort the original csv the way you want it in the first place and then compare the new csv to the original csv?  Creating the dbtable seems like an unnecessary step.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      I agree.  You have control over the baseline file, I'm assuming.  So, rather than taking it in UNsorted, simply sort it and then do the compare.

      Methodology -> I'd probably use a DDT driver of sorts to load the sorted file in and then, row by row, compare it to the on screen table object.

      • sonya_m's avatar
        sonya_m
        SmartBear Alumni (Retired)

        Thank you Marsha and Robert!

         

        Hi asavoia , did you try implementing this suggestion?