Laravel Dusk Test passes when ran individually but fails when ran as part of a suite

Published

I am trying two run two tests on a single Test Class in Laravel dusk. It passes when ran individually but fails when ran as part of a suite.

Here, my first test passes, but second test is failing.

Exception looks like:

There was 1 error:

1) TestsBrowserFrontJobApplyTest::jobseeker_can_apply_to_a_job
IlluminateContractsContainerBindingResolutionException: Target class [env] does not exist.

/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:879
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:758
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:851
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:694
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:836
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:1423
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:571
/home/ellite/code/labs/jagirhouse/app/Core/Providers/TelescopeServiceProvider.php:26
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:60
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:60
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php:279
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:61
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:323
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:281
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:330
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:475
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Watchers/QueryWatcher.php:48
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:404
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:249
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:887
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:728
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:683
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:502
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php:109
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:364
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:227
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261
/home/ellite/code/labs/jagirhouse/database/migrations/2014_10_12_000000_create_users_table.php:46
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:394
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:403
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:202
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:167
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:112
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:85
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:94
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Util.php:40
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:653
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Command/Command.php:298
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:121
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:55
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Util.php:40
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:653
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Command/Command.php:298
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:121
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:1005
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:299
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:171
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Application.php:94
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Application.php:186
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:260
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:413
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php:19
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:126
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:91
/home/ellite/code/labs/jagirhouse/vendor/laravel/dusk/src/TestCase.php:23

Caused by
ReflectionException: Class "env" does not exist

/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:877
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:758
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:851
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:694
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:836
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:1423
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Application.php:571
/home/ellite/code/labs/jagirhouse/app/Core/Providers/TelescopeServiceProvider.php:26
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:60
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:60
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/Traits/EnumeratesValues.php:279
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Collections/HigherOrderCollectionProxy.php:61
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:323
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:281
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:330
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Telescope.php:475
/home/ellite/code/labs/jagirhouse/vendor/laravel/telescope/src/Watchers/QueryWatcher.php:48
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:404
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:249
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:887
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:728
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:683
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Connection.php:502
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php:109
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:364
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php:227
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:261
/home/ellite/code/labs/jagirhouse/database/migrations/2014_10_12_000000_create_users_table.php:46
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:394
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:403
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:202
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:167
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:112
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:85
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:585
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php:94
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Util.php:40
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:653
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Command/Command.php:298
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:121
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:68
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Concerns/CallsCommands.php:28
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/FreshCommand.php:55
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:36
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Util.php:40
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:93
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php:37
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Container/Container.php:653
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:136
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Command/Command.php:298
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Command.php:121
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:1005
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:299
/home/ellite/code/labs/jagirhouse/vendor/symfony/console/Application.php:171
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Application.php:94
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Console/Application.php:186
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php:263
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:260
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Testing/PendingCommand.php:413
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/Concerns/InteractsWithConsole.php:66
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/DatabaseMigrations.php:19
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:126
/home/ellite/code/labs/jagirhouse/vendor/laravel/framework/src/Illuminate/Foundation/Testing/TestCase.php:91
/home/ellite/code/labs/jagirhouse/vendor/laravel/dusk/src/TestCase.php:23

Source: Laravel

Published
Categorised as laravel, laravel-dusk Tagged ,

Answers

Leave a Reply

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq