So I have a Selenium Appium Python script for my testing purpose. I created the UI website using Laravel.
My script consists of around 3 test cases: def test_login_success def test_less_phone_number def test_more_phone_number
this is my LoginScriptController:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Storage;
class LoginScriptController extends Controller
{
public function runLoginScript()
{
$command = 'pytest ../automation/app.py -k "test_login_success or test_less_phone_number or test_more_phone_number" 2>&1';
exec($command, $output, $returnCode);
if ($returnCode === 0) {
return response('Script executed successfully', 200);
} else {
return response('Script encountered an error', 500);
}
}
}
When I click the button "Run test" on my website UI, the app always breaks down (crashed) and the first test case stopped (returns a Failed status). I already tried running it manually from my terminal using pytest app.py -k "test_login_success or test_less_phone_number or test_more_phone_number"
but it works ok (returns PASSED status for all cases).
I can't find what's making my app breaks down
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire