Skip to content

Instantly share code, notes, and snippets.

View arifsuhan's full-sized avatar

Arif Suhan arifsuhan

View GitHub Profile
@arifsuhan
arifsuhan / csv_to_sqlite3.py
Last active July 7, 2023 06:22
A script to turn csv file into sqlite3 table
#! /usr/local/bin/python3
import csv, sqlite3
class csv_2_sqlite:
def __init__(self, file_name, db_name, table_name):
self.file_name = file_name
self.db_name = db_name
self.table_name = table_name
@arifsuhan
arifsuhan / newman_runner.sh
Last active April 6, 2024 00:45
Run Postman Collection with Newman Runner in Docker
collection_Json="Reqres_MW.json"
env_Json="Reqres_Env.json"
report_name="Automate Postman Test Reporting"
# Install Newman-Runner and Run Postman Collection Locally
# install packages
npm install -g newman
npm install -g newman-reporter-htmlextra # need for only Way 3(run and generate html report)
@arifsuhan
arifsuhan / soupMeetsWget.py
Last active August 30, 2021 17:14
Parse Web via BeautifulSoup -> download via Wget -> Rename File
# @title Get URLs
import os
import sys
import wget
import pandas as pd
from bs4 import BeautifulSoup
def get_soup(url):
page = requests.get(url)
@arifsuhan
arifsuhan / Dockerfile
Last active January 29, 2023 20:20
Postman Collection with Newman Runner in Docker
FROM alpine
RUN apk add --update npm
RUN npm install -g newman http-server newman-reporter-htmlextra
COPY file/ run/
WORKDIR run
RUN newman run Reqres_MW.json -e Reqres_Env.json -r htmlextra --reporter-htmlextra-title 'Reqres_report' --reporter-htmlextra-export "newman/index.html"
WORKDIR newman
EXPOSE 8080
Entrypoint ["http-server"]
@arifsuhan
arifsuhan / newman_jenkin.md
Last active October 31, 2021 18:39
Run Postman collection with Jenkins and Newman Runner

Newman Runner Setup

  1. Install npm
  sudo apt install npm
  1. Install Newman Runner globally
  npm install -g newman
  1. Check postman scripts
@arifsuhan
arifsuhan / git_clone.sh
Last active September 18, 2021 19:14
Clone Github Repository with Generate Github Auth Token
#!/bin/bash
function run_cmd(){
cmd="git clone https://"$1"@github.com/"$2"/"$3".git"
echo $cmd
eval $cmd
}
token="***"
owner=("user-A" "user-B")
@arifsuhan
arifsuhan / perf_101.md
Last active November 1, 2021 23:46
Jmeter Perf-load Testing

Guideline 1: Jmeter Setup

  1. Download Jmeter

    1. Download suitable Jmeter from here
      Prefer: Binaries .zip file
  2. Environment Setup

    1. Unzip .zip file and set path variables
      Path: ./apache-jmeter-x.x.x/bin/
      Ex: ./apache-jmeter-5.2.1/bin/
@arifsuhan
arifsuhan / xml_parser.java
Last active November 8, 2021 19:31
xml parse java rest assured
// used version
// testImplementation 'io.rest-assured:rest-assured:4.3.1'
// implementation 'com.squareup.okhttp3:okhttp:3.14.6'
import io.restassured.path.xml.XmlPath;
import io.restassured.specification.RequestSpecification;
import okhttp3.MediaType;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
@arifsuhan
arifsuhan / TestTriangle.md
Last active November 15, 2021 18:44
The Art of Software Testing 3 | A Self Assessment Test | unit test python

Problem

The program reads three integer values from an input dialog. The three values represent the lengths of the sides of a triangle. The program displays a message that states whether the triangle is scalene, isosceles, or equilateral.

Remember that a scalene triangle is one where no two sides are equal,

@arifsuhan
arifsuhan / db_query.md
Last active July 7, 2023 06:22
query raw database sqlite sqlite3

Enter into DB

sqlite3 [filename.db]

Check Table List

.tables