@@ -236,6 +236,28 @@ def display_ci_links(config_data,filter):
236236 return selected_config_data
237237
238238def get_query_options ():
239+
240+ """
241+ Displays or retrieves the user-selected query option for job history functionalities.
242+
243+ Behavior:
244+ - If running in a non-Jenkins environment (JENKINS == "False"):
245+ Prompts the user to select one of the available job history options:
246+ 1. Check Node Crash
247+ 2. Brief Job Information
248+ 3. Detailed Job Information
249+ 4. Failed Testcases
250+ 5. Get Builds with Testcase Failure
251+ 6. Get Testcase Failure Frequency
252+ 7. Get Build Based on Release
253+ Returns the user's selected option.
254+
255+ - If running in a Jenkins environment (JENKINS == "True"):
256+ Reads the preconfigured option from the Jenkins configuration (config_vars).
257+
258+ Returns:
259+ str: The selected option (as input or configuration value).
260+ """
239261 if JENKINS == "False" :
240262 print ("Please select one of the option from Job History functionalities: " )
241263 print ("1. Check Node Crash" )
@@ -253,6 +275,24 @@ def get_query_options():
253275 return option
254276
255277def get_testcase_names ():
278+
279+ """
280+ Retrieves a list of testcase names either from user input or from Jenkins configuration.
281+
282+ Behavior:
283+ - If running in a non-Jenkins environment (JENKINS == "False"):
284+ Prompts the user to manually enter testcase names separated by commas.
285+ Example: test_case_1,test_case_2,test_case_3
286+ Returns a list of those testcase names.
287+
288+ - If running in a Jenkins environment (JENKINS == "True"):
289+ Reads the testcase names from the Jenkins configuration variable
290+ (under the 'Settings' section, key 'tc_name') and splits them into a list.
291+
292+ Returns:
293+ list[str] | None:
294+ A list of testcase names.
295+ """
256296 tc_list = []
257297 if JENKINS == "False" :
258298 tc_name = input ("Enter the testcase names comma seperated: " )
0 commit comments