0

hlo, i have a code in php with different functions. i want to test that functionality with php code. plz tell me how this automated test code would be written? individually i had test these functions but there is a requirement of a single code with which all the functions run and give the results.
thanks

2
Contributors
4
Replies
29
Views
3 Years
Discussion Span
Last Post by annyangel
0

That's a bit vague. Are you talking about unit testing? Perhaps if you posted your code and commented on what you need to do?

0

these files are test cases for individually test each function i.e called unit testing. Now, i want a help to done automation testing using these all functions written in a single code.

** addNewMember.php**

<?php

// Test file
//Function Name:addNewMember
//Class Name :ADAO
//File Name: ADAO.php


require_once("../ADAO.php");

$obj= new ADAO();
$intro_id="247"; 
$pid="247";
$username="jindal1l";
$password="jindal1l";
$first_name="test";
$last_name="jindal";
$address="hsp";
$email="testmlm8@gmail.com";
$phone="7786";
$mobile="911234567890";
$pin="123456";
$city="hsp";
$state="punjab";
$doj="2013-11-26 12:00:10";
$status="2";

$obj->addNewMember($intro_id,$pid,$username,$password,$first_name,$last_name,$address,$email,$phone,$mobile,$pin,$city,$state,$doj,$status);

?>

**inserInMatrix.php**

<?php

// Test file
//Function Name:insertInMatrix
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$id ="247";
$pid="255";
$obj->insertInMatrix($id,$pid);

?>

**updateParentChildCount**

<?php

// Test file
//Function Name:updateParentChildCount
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$id ="255";

$obj->updateParentChildCount($id);

?>

updateDirectRefferalIncome

<?php

// Test file
//Function Name:updateDirectRefferalIncome
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$id ="255";

$obj->updateDirectRefferalIncome($id);

?>

insertInBinary

<?php

// Test file
//Function Name:insertInBinary
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$user_id ="255";
$pid="247";
$leg="left";
$obj->insertInBinary($user_id,$pid,$leg);

?>

updateBinaryChildCount

<?php

// Test file
//Function Name:updateBinaryChildCounts
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$user_id ="255";
$pid="255";
$leg="right";

$obj->updateBinaryChildCounts($user_id,$pid,$leg);

?>

createBinaryPaymentAccount

<?php

// Test file
//Function Name:createBinaryPaymentAccount
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();
$user_id="255";
$pid ="247";

$obj->createBinaryPaymentAccount($user_id,$pid);

?>

updateBinaryRegularIncome

<?php

// Test file
//Function Name:updateBinaryRegularIncome
//Class Name :ADAO
//File Name: ADAO.php

require_once("../ADAO.php");
$obj= new ADAO();


$obj->updateBinaryRegularIncome();

?>
0

thnks 4 ur effort but i cann't use any testing tool. I jst write a simple php code through which data inserted into the database

Edited by annyangel

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.