Skip to content

Instantly share code, notes, and snippets.

View Lewisjp's full-sized avatar

LewisJPaul Lewisjp

View GitHub Profile
They instruct Copilot to act as a heuristic-based tester and give concrete, actionable feedback for the PR.
1. General / Master Prompt (use this first for an overview)
You are an expert exploratory tester using the Quality Tree Software Test Heuristics Cheat Sheet (2006). Review the code changes and tests in this pull request.
For every major category in the cheat sheet (Data Type Attacks, Web Tests, Goldilocks, CRUD, Follow the Data, Boundaries/Interruptions, Sequences/Sorting, Configurations, Multi-User, Variable Analysis, State Analysis, Nouns & Verbs, Judgment, Users & Scenarios, Touch Points, etc.), briefly evaluate:
- Does the PR adequately address this heuristic?
- What risks or gaps remain?
- Suggest 2-3 specific test ideas or improvements that would make the change more robust.
@Lewisjp
Lewisjp / AutomatePython2
Created December 26, 2014 22:21
Automate Python part 2
for dataBit in data:
# indent so we know we're in this loop
# Here is where you add the particulars to automate your process
# n
# |\ | or
# _| \-/ic
# / un
# // ~ + \
# // |
# // \ \
@Lewisjp
Lewisjp / AutoPython1
Created December 26, 2014 22:14
Automate Python part 1
import time
from time import sleep
# we're going to add a delay so we don't overwhelm the system
import os
# we're going to manipulate operating system interfaces
getInput = open('input.text', 'r+')
# variable = opening file('file name', Opens a file for both reading and writing. The file pointer will be at the beginning of the file)
data = getInput.read() # read the data from the open file
@Lewisjp
Lewisjp / Cat Private Owner
Created September 29, 2014 03:57
java private variables & methods example
package shelter;
public class Cat {
public static void main(String[] args){
CatTraits WilliamWallace = new CatTraits();
// Here we use our get method to find the value of the private variable, privateOwner
System.out.println("William Wallace the cat responds to one master, " + WilliamWallace.getOwner() + ".");
@Lewisjp
Lewisjp / Cat Shelter
Created September 23, 2014 03:46
This example calls on Java Constructors
package shelter;
public class Cat {
public static void main(String[] args){
// Here we use the default options
CatTraits Gambit = new CatTraits();
public class Hello2 {
//static method - notice the "static" keyword
public static void staticScoobyDoo(){
System.out.println("static scoobyDoo");
}
//non-static method - notice there's no "static" keyword
public void scoobyDoo(int arg){
System.out.println("scoobyDoo");
}
@Lewisjp
Lewisjp / gist:8a741ab8cd964a537e92
Created May 13, 2014 17:50
Java example 4/13/14
public class Hello{
//public - scope. Who can see this method? public means anyone can access thru class
//static - is there one instance per application or multiple instances allowed? static means only 1
//void - return type - void means return nothing
//main - the function/method name. can be anything
//String[] arguments - your menthod params. String[] is the type, arguements is the var name
public static void main(String[]arguments){
//Program execution begins here
String ret = getHelloWorld();
Hello instance = new Hello();
@Lewisjp
Lewisjp / Hello World
Created May 7, 2014 17:52
Java Hello World
package hello_world;
public class HelloWorldMainClass {
public static void main (String[] argv){
System.out.print("Hello World");
}
}
@Lewisjp
Lewisjp / gist:11403360
Created April 29, 2014 15:15
Plutonium Dragon
var playerLevel = 1;
var playerClass = "none";
function plutoniumDragon (playerLevel) {
var creatureLevel = 20;
if(playerLevel < 5){
alert("Plutonium Dragon will not pursue anyone of Level 5 or below.");
}
else if(playerLevel >= creatureLevel){
@Lewisjp
Lewisjp / RT blog1
Created February 17, 2014 05:37
Step1 to using the Rotten Tomatoes API
def initialize(film)
api_key = ENV['SECRET_TOKEN']
# Convert user input into something we can use in the API
movie = film[0].gsub(/\s/ , "+")
# Use JSON get data
@movieAPIdata = JSON.parse(open("http://api.rottentomatoes.com/api/public/v1.0/movies.json?apikey=#{api_key}&q=#{movie}&page_limit=1").read)
end