Bits N Tricks

A platform to contribute to the best of our knowledge so someone else can be benefited.

How to run a PHP script as Cron job from SSH (Linux shell) 12Nov, 2010

How to run a PHP script as Cron job from SSH (Linux shell)

You can run a PHP script on cron by setting up a crontab For this, first login to your shell using an SSH client such as PuTTY. And on the command line, type the following command (here # means the shell prompt): # crontab -e That will put you in the Vi editor editing your crontab. First press “i” to begin inserting, then type out your cron line following the format below for each line, then press the “escape” key on your keyboard to get out of insert mode, and then type “:wq” and press “enter” to save it. The form of a crontab file is: minute hour day month weekday command For example: 42 4 1 * * /usr/bin/php…

Posted in: Cron, SSH
How to use MySQL from SSH (Linux shell) 12Nov, 2010

How to use MySQL from SSH (Linux shell)

Using MySQL from SSH may seem to be quite tricky if you’ve never done it before – but fear not – below is a list of MySQL commands that you can use to perform the required actions. Start by logging-in using a SSH client, like PuTTY, to access the shell command line. Below when you see # it means from the unix shell. And when you see mysql> it means from a MySQL prompt after logging into MySQL. To login (from unix shell) use -h hostname only if needed # mysql -h hostname -u root -p This would ask you for a password and after providing the correct password you’d be logged-in to the MySQL prompt. If you get an…

Posted in: MySQL, SSH
WinRunner (Invoking Flight Reservation) 31Aug, 2010

WinRunner (Invoking Flight Reservation)

It is a sample application we are going to test in Winrunner. Steps:- 1.) Open Win Runner 2.) Press F2(Start Recording). 3.) Press F7 4.) Select Invoke Application. 5.) Click Args. 6.) Click browse. 7.) Open C://Program Files/Mercury Interactive/WinRunner/Samples/Flight/app/flight1a 8.) Click Open 9.) Click Paste 10.) Click Execute. 11.) Input Agent Name,Password as “mercury”(always to open this). 12.) Click Ok,(Closes Fucntion Generator) 13.) Stop Recording. 14.) Closes Flight Reservation. 15.) Run the recorded Script

Posted in: Testing
WinRunner 16Aug, 2010

WinRunner

It is a functional regression testing tool developed by mercury interactive corporation. Invoke Application 1.)It is an initial concept to establish a logical link between application & testing tool. 2.)Identifies whether the application invokes easily or not. CALCULATOR -> Windows simple Application to invoke or invoke_application Invoking Calculator Steps:-> 1.) Open Winrunner. 2.) Select blank text. 3.) Press F2=>(start recording) 4.) Press F7=> invoke application “path”. 5.) Function Generator(pre-defined functions),We can also select functions out of given. 6.) Establish link between application & tool. 7.) Select invoke_application. 8.) Click args(arguments). 9.) Click browse(….). 10.) Click C:/Windows/System32/calc. 11.) Click open. 12.) Click paste. 13.) Click close(Closes Function Generator). 14.) Click Stop. 15.) Click Run from TOP. 16.) Click Ok

Posted in: Testing
Automation Testing 11Aug, 2010

Automation Testing

Automation Testing:- It is a modern technique followed based on software engineering ISO, IEEE standards. Why Automation Testing:- Automated software testing is the best way to increase the effectiveness, efficiency and coverage of your software testing. How Automation Testing Works: Automation Software Testing Tool is able to playback pre-recorded and predefined actions, compare the results to the expected behavior and report the success or failure of these manual tests to a test engineer. Once automated tests are created they can easily be repeated and they can be extended to perform tasks impossible with manual testing. Because of this, savvy managers have found that automated software testing is an essential component of successful development projects. AUTOMATION SOFTWARE TESTING TOOLS SUITE ->…

Posted in: Testing
Subversion – Rules, Crash Course and Work Cycle 09Jun, 2010

Subversion – Rules, Crash Course and Work Cycle

RULES Rule #1: Check in only completed functioning code that you believe works. Bugs may be found later, but don’t check in anything that you know is incomplete or broken. Rule #2: Check in as often as possible without breaking rule #1. Rule #3: Always perform an update before a check-in. Rule #4: Reference the svn red book often. http://svnbook.red-bean.com/ Rule #5: Do not mess around with the .svn directories in the check-out unless you’re an expert with subversion. CRASH COURSE: Subversion (svn) is a source code repository like microsoft sourcesafe, cvs, or borland starteam. The main repository we use is called simply ‘main’. Beneath main, everything is organized into projects. There is a project for the main website itself,…

Posted in: SVN