【发布时间】:2014-12-28 09:35:26
【问题描述】:
我开始设计软件测试并使用selenium和phpunit,然后我有以下情况
- 我需要为
code igniter开发测试 - 我们需要使用代码点火器上的数据设置会话
- 我有 2 个表格,第一个捕获数据字段,然后我用它生成第二个
- 我使用以下函数来捕获第一种形式的输入,然后生成第二种形式
class HistorialPeajesFecha extends ConsultasWebController
{
...
public function seleccioneFecha()
{
$this->idVehiculo = $this->input->post('placa');
// I need to generate info with the system session with codeigniter
//how I do the setup the session to do the test
$this->session = $this->session->userdata('myproject');
$idUsuario = $this->session['id_usuario'];
$results = $this->factura->listarHistorialPagos( $idVehiculo, $idUsuario );
$data = array(
'idVehiculo' => $this->idVehiculo,
'attributesForm' => array('id' => 'form_seleccion_fecha'),
'other' => $results
);
$this->load->view( 'consultasWeb/templateHeaderView');
$this->load->view( 'consultasWeb/templateMenuView', $data );
$this->load->view( 'consultasWeb/historialFecha/seleccioneFechaView', $data );
}
...
}
我的问题是,我如何设计测试来检查输出视图('consultasWeb/historialFecha/seleccioneFechaView')与第一种形式的输入?
URL 1 FORM : localhost/myproject/index.php/consultasWeb/historialFecha/
URL 2 FROM : localhost/myproject/index.php/consultasWeb/historialFecha/seleccioneFechaView
【问题讨论】:
标签: php selenium phpunit integration-testing