Description
Kyle M Hall
2024-07-24 12:11:47 UTC
Created attachment 169472 [details] [review] Bug 37448 - Add script to allow developers to quickly generate large amounts of data for development and testing Test Plan: 1) Apply this patch 2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall -d zipcode=111111 3) Search patrons' for the name "Hall" 4) Note there are 99 Hall's in your results! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 169474 [details] [review] Bug 37448 - Add script to allow developers to quickly generate large amounts of data for development and testing Test Plan: 1) Apply this patch 2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall -d zipcode=111111 3) Search patrons' for the name "Hall" 4) Note there are 99 Hall's in your results! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 169486 [details] [review] Bug 37448 - Add script to allow developers to quickly generate large amounts of data for development and testing Test Plan: 1) Apply this patch 2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall -d zipcode=111111 3) Search patrons' for the name "Hall" 4) Note there are 99 Hall's in your results! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 169487 [details] [review] Bug 37448: Make use of build_sample_biblio and build_sample_item The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed To test, before this patch, run: 1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio) 2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Side info: Enabling ILL and installing FreeForm by running: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) If we then run: misc/devel/create_test_data.pl -n 99 -s Illrequest -d backend=FreeForm It works beautifully, and although not an exact 1 to 1 to what I did at https://github.com/ammopt/koha-ill-dev/blob/master/lib/KohaFactory/ILL.pm This way using the test builder instead is much more elegant and practical. Thanks Kyle this is awesome. Created attachment 169488 [details] [review] Bug 37448: Make use of build_sample_biblio and build_sample_item The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed To test, before this patch, run: 1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio) 2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 169489 [details] [review] Bug 37448: Make use of build_sample_biblio and build_sample_item The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed To test, before this patch, run: 1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio) 2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Thanks for the excellent followup Pedro! Created attachment 169490 [details] [review] Bug 37448: Add build_sample_ill_request The linked biblio_id of a generated test ILL request needs to be created by build_sample_biblio->AddBiblio. Or else the related biblio is created by just 'build' and is not indexed + its related metadata is missing. To test: 1) Enabling ILL and installing FreeForm by running: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) 2) Run the script for ILL requests: misc/devel/create_test_data.pl -n 5 -s Illrequest -d backend=FreeForm 3) Visit the ILLModule: http://<intra_url>/cgi-bin/koha/ill/ill-requests.pl 4) Notice it loads 5 test ILL requests correctly Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Apologies for the additional follow-up, but upon further testing this is required for ILL requests I want to make use of this script for ILL testing (!). Created attachment 169550 [details] [review] Bug 37448 - Add script to allow developers to quickly generate large amounts of data for development and testing Test Plan: 1) Apply this patch 2) Run: misc/devel/create_test_data.pl -n 99 -s Borrower -d surname=Hall -d zipcode=111111 3) Search patrons' for the name "Hall" 4) Note there are 99 Hall's in your results! Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Created attachment 169551 [details] [review] Bug 37448: Make use of build_sample_biblio and build_sample_item The script is brilliant, but for biblios and items we should make use of build_sample_biblio and build_sample_item or this data does not get indexed + linked tables rows get missed To test, before this patch, run: 1) misc/devel/create_test_data.pl -n 5 -s Biblio -d title=Test Notice the 'Test' biblio is created on the database, but doesnt show on searches, and accessing it directly through URL throws a 500 error (because metadata does not exist for the biblio) 2) Apply this patch. Repeat the step above. Notice it now shows on searches and visiting the biblio directly shows no errors Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 169552 [details] [review] Bug 37448: Add build_sample_ill_request The linked biblio_id of a generated test ILL request needs to be created by build_sample_biblio->AddBiblio. Or else the related biblio is created by just 'build' and is not indexed + its related metadata is missing. To test: 1) Enabling ILL and installing FreeForm by running: bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh) 2) Run the script for ILL requests: misc/devel/create_test_data.pl -n 5 -s Illrequest -d backend=FreeForm 3) Visit the ILLModule: http://<intra_url>/cgi-bin/koha/ill/ill-requests.pl 4) Notice it loads 5 test ILL requests correctly Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Created attachment 169553 [details] [review] Bug 37448: (QA follow-up) Tidy script Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> |