Error: Unit-Test fail to locate factory class but running the same factory in tinker (no issue in tinker). For Laravel 6.8 or above, changes were made to “Unit-Test” to not loaded the framework anymore. So, if you need to use a “Factory” you should create a test within the “Feature-Test” directory or: use this (inContinue reading “Unit Testing Laravel: InvalidArgumentException, fail to locate factory classes (Unknown formatter)”