Skip to content

Instantly share code, notes, and snippets.

View p00j4's full-sized avatar

Pooja Shah p00j4

View GitHub Profile
@p00j4
p00j4 / vs_code_powershell_settings.json
Last active June 14, 2022 14:20
Auto Code formatting for Powershell using VS Code settings
{
"window.zoomLevel": 1,
"powershell.codeFolding.enable": true,
"powershell.codeFormatting.addWhitespaceAroundPipe": true,
"powershell.codeFormatting.autoCorrectAliases": false,
"powershell.codeFormatting.useCorrectCasing": true,
"powershell.codeFormatting.whitespaceInsideBrace": true,
"powershell.codeFormatting.useConstantStrings": true,
"powershell.codeFormatting.openBraceOnSameLine": false,
"powershell.scriptAnalysis.enable": true,
@p00j4
p00j4 / .pylintrc_strict
Created January 23, 2018 13:54
pylintrc file with readable error message template | strict rules
# Based on Apache 2.0 licensed code from https://github.com/ClusterHQ/flocker
[MASTER]
# Specify a configuration file.
#rcfile=
# Python code to execute, usually for sys.path manipulation such as
# pygtk.require().
#init-hook="import quarkc"
@p00j4
p00j4 / UsersFetchUtils.py
Created May 2, 2017 07:22
Get Users from Github and Slack team
"""
A sample to get github users and slack sers of provided team tokens
prived the detaisl where "GIVE" is written & run this file it will get you both the lists from there copy and create a dict of GITHub & Slack name sof that user manually
(Note: it would have completely automated based on mail id but there are some privacy settings which doesn't reveal all user's mail id so this is the best can do in current context, however if you are sure all your github users have public email id then you just need to write 1 more mapper to get final dict 100% automatically)
"""
import requests
import simplejson as json
GIT_TOKEN = "<GIVE_YOUR_GIT_TOKEN>"
The Problem
Just like any other browser except firefox, you need additional setup for OperaDriver too.
A Solution
Let's step through how to do it and make sure it's working.
An Example
The prebuilt OperaDriver executable can be downloaded from here (https://github.com/operasoftware/operaprestodriver/downloads). Download it, double-click it, and click Trust when prompted.
Now if we open up an interactive Ruby terminal (e.g., irb) and launch a Selenium instance, here's what we'd see.
@p00j4
p00j4 / How to automate API testing with selenium
Last active July 4, 2016 09:46
Gist for documenting elemental tips
Useful for testing of the products for which post parameters & response validation is very important at the client side itself.
The Problem
question: In general how do you do API testing?
answer: take the API from development document, hit it manually and check the response based on the post payload or may be write a automation suit around API using tools like SoapUI or Postman or some sort of API tests running in isolation from functional tests, isn't it?
what if when you can actually automate the API testing within the same functional test which ensures the user functional flow? does it sound more reliable testing!
or assume an automated way which can also give debugging metrics to figure out the Caught bug is from front-end or backend and help tracking almost all integration issues(front-edn to backend) at earlier stage. One more layer of smartness to add up in test report, sounds interesting?
A Solution