Notes![what is notes.io? What is notes.io?](/theme/images/whatisnotesio.png)
![]() ![]() Notes - notes.io |
String pathToMappingSheet= constants.pathToMappingSheet;
//Variable to be returned to downstream to fetch values from mapping sheet.
valueInMappingSheet = new LinkedHashMap<String,String>();
logger.debug("Parsing Mapping File placed in:- " + pathToMappingSheet);
List<String[]> mappingSheet;
String journeyIdInMappingSheet = testDataValues.get("journeyid");
logger.debug("JourneyId to mapping sheet -->" + journeyIdInMappingSheet);
try{
mappingSheet = parser.parseAll(new FileReader(pathToMappingSheet));
Map<Integer,String> columnsInMappingSheet = new LinkedHashMap<Integer,String>();
//Temp varaibles
int r = 1;
int testDataColumnNo = 0;
for (String[] row : mappingSheet) {
//assuming first column is always journeyID
String mappingSheetId = row[0];
if(r==1){
//Resetting the value
r=0;
for(int i=0;i<=row.length-1;i++)
{
String testDataColumn= row[i];
if(testDataColumn.equalsIgnoreCase("testdata")){
testDataColumnNo = i;
}
columnsInMappingSheet.put(i, row[i]);
}
logger.debug("Listed are the columns present in MappingSheet");
columnsInMappingSheet.forEach((k,v) -> //Java 8-> reducing entrySet Iteration
logger.debug(" key:: "+ k +" value:: "+ v));
}else if(journeyIdInMappingSheet.equals(mappingSheetId) && constants.hasFailure==false){
logger.debug(journeyIdInMappingSheet +" is matching with Matching Sheet..");
// logger.debug("nTotal No of Data present in a row : " +row.length);
for(int i=0;i<=row.length-1;i++){
if(testDataColumnNo==i && row[testDataColumnNo]!=null){
String columnValue = row[testDataColumnNo];
String testDataValue = testDataValues.get(columnValue.toLowerCase());
logger.debug(" Test Data Value " + testDataValue);
valueInMappingSheet.put(columnsInMappingSheet.get(i),testDataValue);
}else{
// System.out.println("nColumnName In mapping sheet " +columnsInMappingSheet.get(i));
logger.debug("n Mapping sheet Value: "+row[i]);
valueInMappingSheet.put(columnsInMappingSheet.get(i),row[i]);
}
}
// valueInMappingSheet.forEach((k,v) ->
// System.out.print("key <Mapping Sheet> : "+ k +" | value <Mapping Sheet> : "+ v + "n"));
/************ Class created to execute the mentioned keywords ****/
executeKeywordobj = new reusuableFunctions(valueInMappingSheet);
// Method[] n=new reusuableFunctions().getClass().getMethods();
// for (int i=0; i<n.length; i++)
// {
// System.out.println("name "+n[i].getName());
// if(n[i].getName().equals(valueInMappingSheet.get("KeyWord")))
// {
//Passing keyword alone
performactionobj = new performAction(valueInMappingSheet.get("KeyWord"),valueInMappingSheet.get("Use Case"),valueInMappingSheet.get("Expected Result") );
performAction.executeAction();
// }
// else
// {
// logger.info("Incorrect keyword in the mapping sheet.. Please check..");
// constants.hasFailure=true;
// constants.statusFlag="Failed: Incorrect keyword in the mapping sheet";
// }
//}
}else{
logger.info("n" + journeyIdInMappingSheet +" is mismatching with mappingSheet");
String mismatchJourneyID ="Journey " + journeyIdInMappingSheet + " provided is mismatching with mappingSheet ";
}
}
}catch(FileNotFoundException E)
{
logger.error("Mapping Sheet: Missing");
reusuableFunctions.dispayAlert("Mapping Sheet Missing in Mentioned Path");
}
}
}
![]() |
Notes is a web-based application for online taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000+ notes created and continuing...
With notes.io;
- * You can take a note from anywhere and any device with internet connection.
- * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
- * You can quickly share your contents without website, blog and e-mail.
- * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
- * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.
Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.
Easy: Notes.io doesn’t require installation. Just write and share note!
Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )
Free: Notes.io works for 14 years and has been free since the day it was started.
You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;
Email: [email protected]
Twitter: http://twitter.com/notesio
Instagram: http://instagram.com/notes.io
Facebook: http://facebook.com/notesio
Regards;
Notes.io Team