Problem:
End to end testing for applications. What if any of your application's functionality relied on JavaScript, though? Can I write a test cases in PHP for my application which relies heavily on JavaScript application, A PHP test cases which will spins up the browser and run my test?
Solution:-
Dusk is meant for end to end browser testing of modern JavaScript applications. When you write application tests, Dusk sends your commands to ChromeDriver, which then spins up Chrome to run your tests in the browser and then reports back the results.
Very nice article where you can see some live example.
End to end testing for applications. What if any of your application's functionality relied on JavaScript, though? Can I write a test cases in PHP for my application which relies heavily on JavaScript application, A PHP test cases which will spins up the browser and run my test?
Solution:-
Laravel released its 5.4 version recently with a new testing
library: Dusk.
Dusk is meant for end to end browser testing of modern JavaScript applications. When you write application tests, Dusk sends your commands to ChromeDriver, which then spins up Chrome to run your tests in the browser and then reports back the results.
Very nice article where you can see some live example.