Wednesday, March 29, 2017

REST API testing tool



1. Install json2csv for generating csv from sample json file
$npm i -g json2csv

2. Install csv-split to generate multiple csv file from one csv file
$npm i -g csv-split


3. Install csvtojson to convert csv files to json
npm i -g csvtojson
4. Save sample json in file example: sample.json

3. Run command to generate csv from sample file
$json2csv -i sample.json -o sample.csv -F
$json2csv -i <sample json file> -o <output csv file> -F (to flatten hierarchal json in single line )

5. Create rows for various test cases in csv file

6. Generate multiple csv files from test case file, which is csv file
$csv-split -i sample.csv -o sample -b name
$csv-split -i <csv file> -o <folder name> -b <file name prefix from csv header>

6. Convert CSV files to json files
$csvtojson sample/sample1.csv > sample/sample1.json


https://github.com/zeMirco/json2csv
https://www.npmjs.com/package/csvtojson
https://www.npmjs.com/package/csv-split

Monday, March 27, 2017

Apache flink

Mac El captian

check java version

java -version

brew install apache-flink

/usr/local/Cellar/apache-flink/1.2.0

cd bin

flink --version
Version: 1.2.0, Commit ID: 1c659cf

as per document there must be ./bin/start-local.sh however this does not have it.


have patience it is 122 MB and it has flink, hadoop and scala you can see the version of them in download link itself

ok! since we are done with the download.

let us unzip it, in Mac you can click and unzip or you can try tar xzf flink-*.tgz

move in, cd flink-*/bin

>>./start-local.sh, and there you go

it is running and goto console:

http://localhost:8081/#/overview