file io - Loading Data into the application from GUI using Ruby -


problem:

hi everyone, building automation suite using ruby-selenium webdriver-cucumber load data application using it's gui. i've take input mainframe .txt files. scenarios create customer , load multiple accounts them per data provided in inputs.

current approach

execute scenario using rake task passing line number parameter , script executed 1 set of data.

to read data particular line, i'm using below code:

  file.readlines("#{file_path}")[line_number.to_i - 1] 

my purpose of using line line loading keep execution running if line fails load.

shortcomings

supposed i've load 10 accounts single customer. current script run 10 times load each account. want can load accounts in single go.

what looking for

to overcome above shortcoming, want capture entire data single customer file accounts etc , load them application in single execution.

also, i've keep track on execution time , memory allocation well.

please provide thoughts on approach , suggestions or improvements welcomed. (sorry long post)

the first thing i'd break down steps -- said in comment, more formally here:

  1. get data apply records. put page necessary information (or support command line specification if not much?).
  2. for each line in file, following (automated): web page inputting data; fill in fields; submit form

given this, i'd 'for each line' instruction should reading line @ time file using file.foreach or similar.

is there beyond needs taken account?


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -