maximizeWindow(); $cliente = $_GET['CLIENTE']; $dominio= $_GET['DOMINIO']; $fecha= date("Y-m-d"); shell_exec('mkdir -p ./tests/_output/debug/'.$cliente.'/'.$fecha.'/'); #log in try{ $I->amOnPage('/'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->see('Nombre de usuario'); $I->fillField('_username', $user); $I->fillField('_password', $pass); #$I->click("//*[@title='Close Toolbar']"); $I->click('_submit'); $I->wait('3'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-0_login'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/dashboard'); $I->wait('3'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-00_dashboard'); $cont_error = $cont_error + 1; } # ____________ FTTH _________________ # Modelo OLT try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/oltmodel/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-1_oltmodel'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/oltmodel/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-1_oltmodelList'); $cont_error = $cont_error + 1; } # Modelo ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onumodel/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-2_onumodel'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onumodel/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-2_onumodelList'); $cont_error = $cont_error + 1; } # Perfil try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/profile/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-3_profile'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/profile/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-3_profileList'); $cont_error = $cont_error + 1; } # OLT try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/olt/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-4_olt'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/olt/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-4_oltList'); $cont_error = $cont_error + 1; } # NAP try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/nap/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-5_nap'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/nap/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-5_napList'); $cont_error = $cont_error + 1; } # ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onu/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-6_onu'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onu/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-6_onuList'); $cont_error = $cont_error + 1; } # Plantilla ONU try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onutemplate/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-7_plantillaONU'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onutemplate/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-7_plantillaONUList'); $cont_error = $cont_error + 1; } # Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/workflow/workflow/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-8_workflow'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/workflow/workflow/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-8_workflowList'); $cont_error = $cont_error + 1; } # Action Workflow try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/workflow/action/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-9_action'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/workflow/action/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-9_actionList'); $cont_error = $cont_error + 1; } # Template try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/template/template/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-10_template'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/template/template/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-10_templateList'); $cont_error = $cont_error + 1; } # NAS try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/radius/nas/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-11_NAS'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/radius/nas/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-11_NASList'); $cont_error = $cont_error + 1; } # VLan ID try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/vlanid/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-12_vlanID'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/vlanid/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-12_vlanIDList'); $cont_error = $cont_error + 1; } # ONU Profile try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onuprofile/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-13_onuProfile'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/onuprofile/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-13_onuProfileList'); $cont_error = $cont_error + 1; } # VLAN Profile try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/vlanprofile/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-14_vlanProfile'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/vlanprofile/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-14_vlanProfileList'); $cont_error = $cont_error + 1; } # Perfil de Tráfico try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/trafficprofile/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-15_perfilTrafico'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/trafficprofile/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-15_perfilTraficoList'); $cont_error = $cont_error + 1; } # Perfil tcont try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/tcontprofile/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-16_perfiltCont'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/ftth/tcontprofile/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-16_perfiltContList'); $cont_error = $cont_error + 1; } # Modelo NAS try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/radius/nasmodel/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-17_modeloNAS'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://ftth.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/radius/nasmodel/list'); $I->wait('3'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/03_FTTH-17_modeloNASList'); $cont_error = $cont_error + 1; } try{ $I->acceptPopup(); }catch(\Exception $e){} print("Test ".$modulo." del Cliente ".$cliente."= (OK: ".$cont_ok.", errores: ".$cont_error.")\n"); $consulta = "INSERT into errores (fecha, modulo, cliente, cant_error, cant_exitos) VALUES (now(), '".$modulo."', '".$cliente."', '".$cont_error."', '".$cont_ok."')"; $resultado = mysqli_query( $conexion, $consulta ); mysqli_close( $conexion ); shell_exec('cp -r ./tests/_output/debug/'.$cliente.' /var/www/html/screen/'); } }