Skip to content

Instantly share code, notes, and snippets.

View PramodDutta's full-sized avatar
🎯
Focusing

Promode PramodDutta

🎯
Focusing
View GitHub Profile
@PramodDutta
PramodDutta / main.py
Created December 10, 2016 12:46
unittest in python for begginers
import unittest
class SimpleCalll(unittest.TestCase):
def setUp(self):
print "Setup"
def tearDown(self):
#Mainter : Promode
version: '2'
services:
progrid:
image: selenium/hub:2.53.1
container_name: progrid
privileged: true
ports:
- 4444:4444
@PramodDutta
PramodDutta / QuickCasperHelp
Last active June 21, 2017 08:33
Casper Quick Walkthrough
##Asserts -
* assert()
* assertDoesntExist()
* assertEquals()
* assertEval()
* assertEvalEquals()
* assertElementCount()
* assertExists()
* assertFalsy()
version: "3"
networks:
main:
driver: overlay
services:
hub:
image: selenium/hub:3.2.0
ports:
- "4444:4444"
Docker Swarm - Deploying a Selenium grid
Objective : To be able run more than 10 browsers and using multiple machines(Server1,2).
Pre Req. -
Docker Swarm requires few ports to be open for it to work. These are
-TCP port 2377. This port is used for communication between the nodes of a Docker Swarm or cluster. It only needs to be opened on manager nodes.
-TCP and UDP port 7946 for communication among nodes (container network discovery).
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Good and Bad Variables - P1">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
@PramodDutta
PramodDutta / JSonSchemaValidationRestAssured.java
Created May 9, 2022 09:39
JSON Schema Validation using Rest Assured
package live.sdet;
import io.restassured.RestAssured;
import org.testng.annotations.Test;
import static io.restassured.module.jsv.JsonSchemaValidator.matchesJsonSchemaInClasspath;
import static org.hamcrest.MatcherAssert.assertThat;
/**
* Unit test for simple App.
@PramodDutta
PramodDutta / FileChoosers.java
Created May 10, 2022 07:29
File Upload and Download in PlayWright
package com.scrolltest.todo;
import com.microsoft.playwright.*;
import java.nio.file.Path;
import java.nio.file.Paths;
public class FileChoosers {
public static void main(String[] args) {
@PramodDutta
PramodDutta / UserCreatorDemo.java
Created February 14, 2023 05:40
Builder Pattern Java - TheTestingAcademy.com
package designpattern.builderPattern;
public class UserCreatorDemo {
public static void main(String[] args) {
User user = new User.UserBuilder("Pramod","Dutta").setAddress("New Delhi").build();
User user2 = new User.UserBuilder("Aman","Ji").setAge(32).build();
}
name=PropertiesConfig
property.filename = logs
appenders = console, file
appender.console.type = Console
appender.console.name = STDOUT
appender.console.layout.type = PatternLayout
appender.console.layout.pattern = [%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
appender.file.type = File
appender.file.name = LOGFILE
appender.file.fileName=AppLog.log