Instructables

5 minute Manual website test script

Picture of 5 minute Manual website test script
Sometimes automatic tests/screenshots are not enough, especially if you pick up a project that hasn't been developed with TDD in mind at first place, therefore forcing you to choose between donating your free time to develop automatic tests or manually testing each page on every global change. For one timer, it might be better to choose second option, so here is a 5 min setup for such scenario.
 
Remove these adsRemove these ads by Signing Up

Step 1: First, we will need a list of all pages in the site

Picture of First, we will need a list of all pages in the site
with [FILTER] i mean for .NET sites *.aspx, for php *php; for both maybe *.htm or *.html too, depends on the pages' structure

If you are sitting at the dev server, navigate with your evelated  cmd prompt to the website folder and write

dir [FILTER] /s/b >> c:\dirlist.txt

Step 2: 2. Locate and edit the file list

Picture of 2. Locate and edit the file list
Open up your favorite file manager (mine is explorer.exe) and direct the file to notepad++.

Step 3: Create frame for launching your tests

Picture of Create frame for launching your tests
Create a new file in notepad++;

Choose web browsers and locate their paths (might need to install them first?). I have choosen 5 of them:
Webkit: chrome & safari
Gecko: firefox
Trident: Iexplore (the secret version only i possess)
Mobile: Opera Mobile emulator that emulates Samsung Galaxy S

Then write a framework for test launching, for example like one i give here

[my first time here, so not sure whether IT will allow me to pass .bat file correctly, so will write a copy of its content below]
SET CURR_PROG="%ProgramFiles%\Internet Explorer\IEXPLORE.EXE"
SET CURR_PROG_A="%ProgramFiles%\Opera Mobile Emulator\OperaMobileEmu.exe" -displayzoom 100 -windowsize 480x800 -ppi 240 -user-agent-string Android -profile-name "Samsung Galaxy S"
SET CURR_PROG_B="%USERPROFILE%\Local Settings\Application Data\Google\Chrome\Application\chrome.exe" --new-window
SET CURR_PROG_C="%ProgramFiles%\Mozilla Firefox\firefox.exe"
SET CURR_PROG_D="%ProgramFiles%\Safari\Safari.exe"

SET CURR_MODULE=%2
SET CURR_SITE=%1
IF [%CURR_SITE%]==[after]  SET CURR_ADDRESS=http://localhost:8118/
IF [%CURR_SITE%]==[before]  SET CURR_ADDRESS=http://localhost:8228/

REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

IF [%CURR_ADDRESS%]==[] GOTO End
IF [%CURR_MODULE%]==[moduleone] GOTO ModuleOne
IF [%CURR_MODULE%]==[moduletwo] GOTO ModuleTwo

IF [%CURR_MODULE%]==[] GOTO ModuleOne;
ELSE GOTO End;
:ModuleOne

pause
IF [%CURR_MODULE%]==[] GOTO ModuleTwo;
ELSE GOTO End;
:ModuleTwo

GOTO End;
:End

what kinds of test does this run?
cayonara (author)  amandaghassaei1 year ago
It helps in manual testing-> gets the list of all forms/files and opens them up in numerous browsers, waiting till user indicates she finished the testing by closing all windows that has been opened by this script.