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('/'); $I->see('Nombre de usuario'); $I->fillField('_username', $user); $I->fillField('_password', $pass); #$I->click("//*[@title='Close Toolbar']"); $I->click('_submit'); $I->wait('5'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-0_login'); $cont_error = $cont_error + 1; } # Dash Maps try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/dashboard'); $I->wait('5'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-1_dashmaps'); $cont_error = $cont_error + 1; } # Mapa try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/map/list'); $I->wait('3'); $I->seeInTitle('Administrador'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-2_mapa'); $cont_error = $cont_error + 1; } # Vetores try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/vector/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-3_vectores'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/vector/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.'/05_Maps-3_vectoresList'); $cont_error = $cont_error + 1; } # Capas WMS try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/wmslayer/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-4_capasWMS'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/wmslayer/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.'/05_Maps-4_capasWMSList'); $cont_error = $cont_error + 1; } # Objetos try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/mapobject/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-5_objetos'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/mapobject/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.'/05_Maps-5_objetosList'); $cont_error = $cont_error + 1; } # Tipo objeto try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/objecttype/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-6_tipoobjeto'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/objecttype/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.'/05_Maps-6_tipoobjetoList'); $cont_error = $cont_error + 1; } # Categorias try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/category/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-7_categorias'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/category/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.'/05_Maps-7_categoriasList'); $cont_error = $cont_error + 1; } # Listado Workflow try{ $I->amOnUrl('https://mapas.' . $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.'/05_Maps-8_listworkflow'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $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.'/05_Maps-8_listworkflowList'); $cont_error = $cont_error + 1; } # Action try{ $I->amOnUrl('https://mapas.' . $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.'/05_Maps-9_action'); $cont_error = $cont_error + 1; } try{ $I->amOnUrl('https://mapas.' . $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.'/05_Maps-9_actionList'); $cont_error = $cont_error + 1; } # Create map try{ $I->amOnUrl('https://mapas.' . $cliente . '.flowdat'.$dominio.'/app_dev.php/admin/map/map/create'); $I->wait('3'); $I->seeInTitle('Administrador Crear'); $cont_ok = $cont_ok + 1; }catch(\Exception $e){ $I->makeScreenshot($cliente.'/'.$fecha.'/05_Maps-10_mapCreate'); $cont_error = $cont_error + 1; } 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/'); try{ $I->acceptPopup(); }catch(\Exception $e){} } }