Am 07.09.20 um 08:28 schrieb [email protected]: > OK, then I guess something like this should help to disambiguate: > > String fileNameFromCSV = vars.get('variable_from_csv'); > new File(fileNameFromCSV).text = > org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024)
I think that it will help Groovy to distinguish the type, but it won't help the OP, as the variable will still be null. There is a difference between a value one thinks a variable holds and the value it really has. I would add a debug sampler before the JSR223 sampler and have a look at the variables with a view results tree. If there is no variable named variable_from_csv listed, then we should investigate, why. Felix > > Markus Wolf > > -----Ursprüngliche Nachricht----- > Von: Sandhya Kiran <[email protected]> > Gesendet: Montag, 7. September 2020 08:25 > An: JMeter Users List <[email protected]> > Betreff: RE: Creation of bulk files for upload > > Hi, > > Yes, variable_from_csv -- refers to "files names" which are assigned to > random files generated. > These "file names" are read from CSV file. > > My CSV file looks like this : > > 1b54d80e-91cc-48d8-8da3-dfff890b2673||aaa1 > 1c54d80e-91cc-58d8-8da3-dfff890b2673||bbb2 > 1e54d80e-91cc-68d8-8da3-dfff890b2673||ccc3 > 1f54d80e-91cc-78d8-8da3-dfff890b2673||ddd4 > 1d54d80e-91cc-88d8-8da3-dfff890b2673||eee5 > > Thanks, > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Monday, 7 September, 2020 2:05 PM > To: [email protected] > Subject: AW: Creation of bulk files for upload > > Hi Sandhya, > > and "1b54d80e-91cc-48d8-8da3-dfff890b2673" is a filename and put into the > variable named "variable_from_csv" ? I am confused. > What does the variable "variable_from_csv" contain, a filename or an URI? > > Mit freundlichen Grüßen, Best regards, С уважением, S Pozdravom > > Markus Wolf > > DEUTSCHE TELEKOM IT GMBH > Prototype Architecture > Markus Wolf > E-PRTAR01_CO > Architekt DigiHub WOM (Workorder Management) Mecklenburgring 25, 66121 > Saarbrücken > +49 681 909 23 89 (Tel) > +49 160 90 12 97 27 (Mobil) > E-Mail: [email protected] > Internet: http://www.t-systems.de > > ERLEBEN, WAS VERBINDET. > > Die gesetzlichen Pflichtangaben finden Sie unter: > https://www.telekom.com/pflichtangaben-dtit > GROSSE VERÄNDERUNGEN FANGEN KLEIN AN – RESSOURCEN SCHONEN UND NICHT JEDE > E-MAIL DRUCKEN. > > Hinweis: Diese E-Mail und/oder die Anhänge sind vertraulich und > ausschließlich für den bezeichneten Adressaten bestimmt. Die Weitergabe oder > Kopieren dieser E-Mail ist strengstens verboten. Wenn Sie diese E-Mail > irrtümlich erhalten haben, informieren Sie bitte unverzüglich den Absender > und vernichten Sie die Nachricht und alle Anhänge. Vielen Dank. > > > -----Ursprüngliche Nachricht----- > Von: Sandhya Kiran <[email protected]> > Gesendet: Montag, 7. September 2020 07:52 > An: JMeter Users List <[email protected]> > Betreff: RE: Creation of bulk files for upload > > Thanks for the response. > > Here is the filename format : 1b54d80e-91cc-48d8-8da3-dfff890b2673||image1 > Should have UUID number format with || symbol as mandatory. > > > -----Original Message----- > From: [email protected] [mailto:[email protected]] > Sent: Monday, 7 September, 2020 1:49 PM > To: [email protected] > Subject: AW: Creation of bulk files for upload > > Hi, > > can you post some more code that explains exactly how you get > 'variable_from_csv'. It looks like there is a type problem there, so that it > is not able to choose between the following constructors of File: > > File(String pathname) > File(URI uri) > > > Markus Wolf > > > -----Ursprüngliche Nachricht----- > Von: Sandhya Kiran <[email protected]> > Gesendet: Montag, 7. September 2020 05:51 > An: [email protected] > Betreff: Creation of bulk files for upload > > Hello, > > Requirement is to generate random files with size less than 1 MB, reading > filenames from CSV and upload files through HTTP sampler. > > I tried using JSR223 pre-processor with below code: > new File(vars.get('variable_from_csv')).text = > org.apache.commons.lang3.RandomStringUtils.randomAlphabetic(1, 1024 * 1024) > > Facing error : > groovy.lang.GroovyRuntimeException: Ambiguous method overloading for method > java.io.File#<init>.Cannot resolve which method to invoke for [null] due to > overlapping prototypes between: [class java.lang.String] [class java.net.URI] > > Could anyone please help me to resolve this issue? > > Thanks in advance. > > > ________________________________ > DISCLAIMER: > > > This e-mail (including any attachments) is for the addressee(s) only and may > be confidential, especially as regards personal data. If you are not the > intended recipient, please note that any dealing, review, distribution, > printing, copying or use of this e-mail is strictly prohibited. If you have > received this email in error, please notify the sender immediately and delete > the original message (including any attachments). > > Opinions, conclusions and other information in this e-mail that do not relate > to the official business of MIMOS Berhad and/or its subsidiaries shall be > understood as neither given nor endorsed by MIMOS Berhad and/or its > subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts > responsibility for the same. All liability arising from or in connection with > computer viruses and/or corrupted e-mails is excluded to the fullest extent > permitted by law. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > ________________________________ > DISCLAIMER: > > > This e-mail (including any attachments) is for the addressee(s) only and may > be confidential, especially as regards personal data. If you are not the > intended recipient, please note that any dealing, review, distribution, > printing, copying or use of this e-mail is strictly prohibited. If you have > received this email in error, please notify the sender immediately and delete > the original message (including any attachments). > > Opinions, conclusions and other information in this e-mail that do not relate > to the official business of MIMOS Berhad and/or its subsidiaries shall be > understood as neither given nor endorsed by MIMOS Berhad and/or its > subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts > responsibility for the same. All liability arising from or in connection with > computer viruses and/or corrupted e-mails is excluded to the fullest extent > permitted by law. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > > ________________________________ > DISCLAIMER: > > > This e-mail (including any attachments) is for the addressee(s) only and may > be confidential, especially as regards personal data. If you are not the > intended recipient, please note that any dealing, review, distribution, > printing, copying or use of this e-mail is strictly prohibited. If you have > received this email in error, please notify the sender immediately and delete > the original message (including any attachments). > > Opinions, conclusions and other information in this e-mail that do not relate > to the official business of MIMOS Berhad and/or its subsidiaries shall be > understood as neither given nor endorsed by MIMOS Berhad and/or its > subsidiaries and neither MIMOS Berhad nor its subsidiaries accepts > responsibility for the same. All liability arising from or in connection with > computer viruses and/or corrupted e-mails is excluded to the fullest extent > permitted by law. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
