maximizeWindow(); $fecha= date("Y-m-d"); #shell_exec('rm -rf ./tests/_output/debug/'.$cliente.'/'.$fecha.'/'); shell_exec('mkdir -p ./tests/_output/debug/'.$cliente.'/'.$fecha.'/'); #log in try{ $I->amOnPage('/'); try{ $I->acceptPopup(); }catch(\Exception $e){} #echo(date("Y-m-d")); $I->see('Nombre de usuario'); $I->fillField('_username', $user); $I->fillField('_password', $pass); #$I->click("//*[@title='Close Toolbar']"); $I->click('_submit'); $I->wait('5'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-0_login'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/dashboard'); $I->wait('3'); $I->seeInTitle('Administrador Panel principal'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-00_dashboard'); $cont_error = $cont_error + 1; } # ____________________ Base _____________________ # Codigos de Autenticación try{ $I->amOnUrl('https://base.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/authcode/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-1_oauthcode'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/authcode/list'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->wait('3'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-1_oauthcodeList'); $cont_error = $cont_error + 1; } # Clientes OAuth try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/oauthclient/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-2_oauthclient'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/oauthclient/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.'/01_Base-2_oauthclientList'); $cont_error = $cont_error + 1; } # Tokens de Acceso try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/accesstoken/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-3_accesstoken'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/accesstoken/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.'/01_Base-3_accesstokenList'); $cont_error = $cont_error + 1; } # Tokens de Refresco try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/refreshtoken/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-4_refreshtoken'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/base/oauthserver/refreshtoken/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.'/01_Base-4_refreshtokenList'); $cont_error = $cont_error + 1; } # Workflow try{ $I->amOnUrl('https://base.'.$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.'/01_Base-5_workflow'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$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.'/01_Base-5_workflowList'); $cont_error = $cont_error + 1; } # Action try{ $I->amOnUrl('https://base.'.$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.'/01_Base-6_action'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$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.'/01_Base-6_actionList'); $cont_error = $cont_error + 1; } # Alertas try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/alert/alert/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-7_alert'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/alert/alert/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.'/01_Base-7_alertList'); $cont_error = $cont_error + 1; } # Tipo de Alertas try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/alert/alerttype/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-8_alerttype'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/alert/alerttype/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.'/01_Base-8_alerttypeList'); $cont_error = $cont_error + 1; } # Crear Usuarios try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/user/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-9_user'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/user/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.'/01_Base-9_userList'); $cont_error = $cont_error + 1; } # Grupos try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/group/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-10_group'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/group/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $cont_error = $cont_error + 1; $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-10_groupList'); } # Tenencias # ________________________ NO BORRA LA TENENCIA DESPUƉS ________________________ try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/tenancy/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $cont_error = $cont_error + 1; $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-11_tenancy'); } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/tenancy/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); }catch(\Exception $e){ $cont_error = $cont_error + 1; $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-11_tenancyList'); } $cont_ok = $cont_ok + 1; # Clientes try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/client/client/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-12_client'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/client/client/list'); $I->wait('3'); try{ $I->acceptPopup(); }catch(\Exception $e){} $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $cont_error = $cont_error + 1; $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-12_clientList'); } # Dispositivos try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/license/device/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $cont_error = $cont_error + 1; $I->makeScreenshot($cliente.'/'.$fecha.'/01_Base-13_device'); } try{ $I->amOnUrl('https://base.'.$cliente.'.flowdat'.$dominio.'/app_dev.php/admin/license/device/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.'/01_Base-13_deviceList'); $cont_error = $cont_error + 1; } print("Test ".$modulo." del Cliente ".$cliente."= (OK: ".$cont_ok.", errores: ".$cont_error.")\n"); #$consulta = "INSERT into errores (modulo) VALUES ('sisi')"; $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/'); try{ $I->acceptPopup(); }catch(\Exception $e){} } }