Groovy Beginner Tutorial 21 | How to read files in groovy

  Рет қаралды 28,599

Automation Step by Step

Automation Step by Step

Күн бұрын

Пікірлер: 65
@manvendrayadav2127
@manvendrayadav2127 2 жыл бұрын
Hi Raghav, Your way of presenting tutorial is very neat and clean and I used to follow all your jenkins/groovy tutorials from last 4-5 years. But I have a suggestion for you. Particularly in Groovy tutorials , when you explain the multiple examples it used to be very quick and you write so many combination of commands which you write very fast and run them, As a learner I think we have less time to consume that, Please request you to explain about the command in details before running them and also explain the output of each commands in details.
@manvendrayadav2127
@manvendrayadav2127 2 жыл бұрын
@Raghav
@RaghavPal
@RaghavPal 2 жыл бұрын
will take this feedback Manvendra, thanks
@mdashrafislam6413
@mdashrafislam6413 5 жыл бұрын
Sir my current project is groovy with moonshine framework, groovy part I get a lot of help from your video, I was experiences with java , c#, python before . Your video help me to learn groovy within a days. Thank you sir . I appreciate your help
@RaghavPal
@RaghavPal 5 жыл бұрын
Glad to know this Ashraf.
@RakeshKumar-eb9re
@RakeshKumar-eb9re 2 жыл бұрын
Hey Rahav I want to read random log file in Jenkins workspace created with new name on each built like abc.log , then on next builtd names changes auto like kbc.log. How to read any file ending with .log using groovy
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Rakesh, will need to check on this, can try online help
@Coorgie
@Coorgie 3 жыл бұрын
Hallo. A very nice tut. I wanted to read a csv file and search for the cell data which matches or the closesr value to my defined value. In looking to this tutorial can i use the Reader or what would you suggest. Thank you in advance :)
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi, you may use regex (regular expression) for this, Can find groovy regex examples online and if you wish to read a story of regex here - automationstepbystep.com/2020/05/05/a-story-of-regex/
@nirmalavare9414
@nirmalavare9414 3 жыл бұрын
Hi raghav,I need to convert my csv file into list of maps..what will be syntax... your help will really appreciate..
@RaghavPal
@RaghavPal 3 жыл бұрын
will need to check online Nirmala
@safeerpasha1051
@safeerpasha1051 2 жыл бұрын
Hello Raghav, Am currently working on project (Jenkins and Groovy) where I have CSV File as an artifact and in the CSV file I have a tabular data which I want to upload it to confluence table. Could you please help with this or any suggestion.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Safeer, you can search for plugins on jenkins to do this
@safeerpasha1051
@safeerpasha1051 2 жыл бұрын
@@RaghavPal Am using Confluence publisher plugin to upload, Uploading is going fine but the problem here is I need to read a CSV file and print header and rows as a tabular format.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Safeer, I am not too sure, will need to check online
@RomainDumoulin-xr6iq
@RomainDumoulin-xr6iq Жыл бұрын
Thanks for this tutorial
@RaghavPal
@RaghavPal Жыл бұрын
Most welcome
@PiyushGhosh-l4k
@PiyushGhosh-l4k 5 ай бұрын
Bhai what is GroovyScriptingContext and GroovyUser in groovy ? please explain
@RaghavPal
@RaghavPal 5 ай бұрын
Piyush In Groovy, `GroovyScriptingContext` and `GroovyUser` are not standard classes or components provided by the language itself. However, I can provide some context based on what I know: 1. `GroovyScriptingContext`: - As of my last knowledge update (which was until 2021), there is no built-in class named `GroovyScriptingContext` in the Groovy programming language. - If you encounter this term in a specific context (such as a library or framework), it might be a custom class defined by a third-party library or application. - To understand its purpose and functionality, you would need to refer to the specific documentation or source code where it is used. 2. `GroovyUser`: - Similarly, there is no standard class called `GroovyUser` in Groovy. - If you come across this term, it could be related to a custom class or object created within a Groovy script or application. - Without additional context, it's challenging to provide a precise explanation for `GroovyUser`. --
@harshitamittal175
@harshitamittal175 2 жыл бұрын
Hi Raghav, i need to take array as a output, but that input will be provided by user only.. not like we are already providing.. how can we do that.
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Harshita, you can get the input from user console stackoverflow.com/questions/10184091/groovy-console-read-input
@swapnilshrishrimal4520
@swapnilshrishrimal4520 2 жыл бұрын
Hi Raghav! Thanks for the tutorial. Can we use repository in place of filepath ? Or we need to use only local workspace ? I need to fetch .properties file from repo and then use it for choice parameter option.
@RaghavPal
@RaghavPal 2 жыл бұрын
You can try that, as long as it is accessible it should be okay
@bottletyre
@bottletyre 3 жыл бұрын
Hi Raghav, How to read a file content and load into jenkins as Dropdown values ? And on selection of 1st Dropdown, how to change the value of the second dropdown values dynamically ?
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Vivek, I will plan a session, can check some online examples also
@bottletyre
@bottletyre 3 жыл бұрын
@@RaghavPal yes Raghav, I found the solution using active choice plugin. Thanks.
@abhijeetsingh089
@abhijeetsingh089 Жыл бұрын
Raghav Bhai ek help Jaise hum property transfer se request response send receive kar sakte.. Vaise groovy se kaise kar sakte hai . please guide
@RaghavPal
@RaghavPal Жыл бұрын
Hi Abhijeet, In Groovy, you can use the setProperty() and getProperty() methods to perform property transfer between different objects.
@abhijeetsingh089
@abhijeetsingh089 Жыл бұрын
@@RaghavPal thanks Sir But do you have any video or any url with steps to do it.. This is be helpful please
@RaghavPal
@RaghavPal Жыл бұрын
I will check on this
@TheJacobs150
@TheJacobs150 3 жыл бұрын
And that is what I was looking for :) Thanks for sharing your knowledge
@RaghavPal
@RaghavPal 3 жыл бұрын
You're welcome Jakub
@carlovandermeer1679
@carlovandermeer1679 2 жыл бұрын
Hi Raghav, I was playing with the "read with reader" example. And when I add a empty line in the file, it still prints the empty line. I would expect != null to igor the line. Why is this? Best regards
@RaghavPal
@RaghavPal 2 жыл бұрын
Hi Carlo, will need to check the code and logs
@sagarpardeshi9002
@sagarpardeshi9002 4 жыл бұрын
Hello Sir, thank you for useful content. I want to read a csv file and create json from it with one for the key value to be a date and date value for each object within the array needs to be unique. I'm able to read csv file referring your video but unable to create json. Can you please create a video on JsonBuilder and/or jsongenerator using groovy.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Sagar, I will check and plan for this session
@MakkenaTejovardhan
@MakkenaTejovardhan 3 жыл бұрын
I have 10000 record in an excel , I need to fecth that data and run the soup script each time till 10000 . Could you please help
@RaghavPal
@RaghavPal 3 жыл бұрын
I will need to check on this
@madhusudandevaraju1207
@madhusudandevaraju1207 4 жыл бұрын
Hi Raghav, can you pls make a video on how to read write an excel file using the apache poi library in soapui tool using the groovy script test step.
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Madhu, I will plan for this
@madhusudandevaraju1207
@madhusudandevaraju1207 4 жыл бұрын
@@RaghavPal Please Raghav. I did a lot of RnD on this but none worked out for me. There is some light shed on this in the below link. smartbear-cc.force.com/portal/KbArticleViewer?name=Example-of-using-third-party-Java-libraries-in-Groovy-script-reading-from-Excel-file-using-Apache-POI&sp=all But I do get some error like MethodNotFound or ClassNotFound every time even after adding all the necessary jars in the ext folder of SoapUI.
@RaghavPal
@RaghavPal 4 жыл бұрын
ok I will check and plan
@rihamchowdhury4020
@rihamchowdhury4020 4 жыл бұрын
Sir how can i read only the json files of a given directory?
@RaghavPal
@RaghavPal 4 жыл бұрын
You can write a code to select the file with .json ext
@hemantmalvi1342
@hemantmalvi1342 4 жыл бұрын
How to read only first line of file, make some changes and return whole file
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Hemant, you will find examples in this video where you can read file line by line. You can use a closure (example shown) and store the first line in a list or can directly write to a file. For writing to file you can check the next video
@hemantmalvi1342
@hemantmalvi1342 4 жыл бұрын
@@RaghavPal Thanks for the tip, I used "find" closure to read first line and did some changes but not sure how to write whole file with first line change to target
@RaghavPal
@RaghavPal 4 жыл бұрын
Did you check the write files session.
@hemantmalvi1342
@hemantmalvi1342 4 жыл бұрын
@@RaghavPal Yes I checked it, Can you let me know how to read file from specific line till end of file.
@RaghavPal
@RaghavPal 4 жыл бұрын
Let me check, If possible will create a session. For now pls try online help.
@sonigandhi3196
@sonigandhi3196 4 жыл бұрын
Can you please make a video of how to read data from excel file in Groovy
@RaghavPal
@RaghavPal 4 жыл бұрын
Hi Soni, I will plan
@alim241081
@alim241081 4 жыл бұрын
Hi raghav,what about excel reading in groovy.
@RaghavPal
@RaghavPal 4 жыл бұрын
I will plan to add the session Alim
@alim241081
@alim241081 4 жыл бұрын
@@RaghavPal thanks sir
@vishnuponduru2955
@vishnuponduru2955 5 жыл бұрын
here what is the difference between list and array output?
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Vishnu, in general array is a data structure consisting of sequential memory storing a collection of objects. List may have multiple implementations like ArrayList
@jaithadani3522
@jaithadani3522 3 жыл бұрын
Raghav where is the source code for all this groovy tutorial videos
@RaghavPal
@RaghavPal 3 жыл бұрын
Hi Jai, can check here github.com/Raghav-Pal/GroovyProject_Mar2020
@prashantaggarwal3723
@prashantaggarwal3723 5 жыл бұрын
sir how can we fetch metadata from imdb using groovy
@RaghavPal
@RaghavPal 5 жыл бұрын
Hi Prashant, may be I have not faced this scenario, Not able to get this. In case you can provide some example, I can check.
@prashantaggarwal3723
@prashantaggarwal3723 5 жыл бұрын
@@RaghavPal sure.. for example there is video file or an audio file and I want to know format , bitrate , codec etc.
@RaghavPal
@RaghavPal 4 жыл бұрын
Okay, honestly, I have not worked on such scenarios. I will have to check online.
@meoweric8045
@meoweric8045 Жыл бұрын
i think this video you teach is too fast
@RaghavPal
@RaghavPal Жыл бұрын
I will improve
Groovy Beginner Tutorial 22 | How to write files in Groovy | File IO
10:04
Automation Step by Step
Рет қаралды 13 М.
Groovy Beginner Tutorial 17 | Lists
17:55
Automation Step by Step
Рет қаралды 20 М.
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 57 МЛН
小丑揭穿坏人的阴谋 #小丑 #天使 #shorts
00:35
好人小丑
Рет қаралды 48 МЛН
Triple kill😹
00:18
GG Animation
Рет қаралды 18 МЛН
1, 2, 3, 4, 5, 6, 7, 8, 9 🙈⚽️
00:46
Celine Dept
Рет қаралды 85 МЛН
Groovy Beginner Tutorial 18 | Maps
13:58
Automation Step by Step
Рет қаралды 19 М.
10 Things You Can Do With Groovy Closures!
26:08
Szymon Stepniak
Рет қаралды 19 М.
6 Verbal Tricks To Make An Aggressive Person Sorry
11:45
Charisma on Command
Рет қаралды 24 МЛН
Groovy Beginner Tutorial 14 | Strings
22:45
Automation Step by Step
Рет қаралды 23 М.
SoapUI Tutorial #11 - Verify XML Response using Groovy | SoapUI Assert
18:28
Software Testing Mentor
Рет қаралды 7 М.
Groovy Beginner Tutorial 20 | Input & Output
10:52
Automation Step by Step
Рет қаралды 14 М.
Using Resource Files From a Jenkins Shared Library
13:58
CloudBeesTV
Рет қаралды 31 М.
Java in 100 Seconds
2:25
Fireship
Рет қаралды 1,3 МЛН
風船をキャッチしろ!🎈 Balloon catch Challenges
00:57
はじめしゃちょー(hajime)
Рет қаралды 57 МЛН