Comments (5)
Hi,
I did some changes in the way task files are generated and i noticed that issue today. Temporary fix is to add
\Codeception\Configuration::config();
into RoboFile.php like this:
/**
* Split tests into separate groups. Tests are split by file not by test.
*/
public function parallelSplitTests()
{
\Codeception\Configuration::config();
// Split your tests by files
$this->taskSplitTestsByGroups($this->numberOfExecutors)
->testsFrom('tests/acceptance')
->projectRoot('.')
->groupsTo('tests/_data/paracept_')
->run();
}
I will create PR with fix as soon as I know why this is happening. Side note: it was working fine for me for months and then it stopped.
It is because codecept_relative_path is resolving paths against project dir and that is not set until Configuration::config()
is executed.
As I said: I will try to solve that in code as soon as I can.
from robo-paracept.
This is probably not the best approach but gets the work done for me. This is how I use taskSplitTestsByGroups
and then later perform a cleanup on it.
so this is how it looks on my end
public function parallelSplitTests()
{
$this->taskSplitTestsByGroups($this->count)
->projectRoot('.')
->testsFrom('tests')
->groupsTo('tests/_groups/robo/robo_')
->run();
$this->groupCleanUp();
}
public function groupCleanUp()
{
foreach (new DirectoryIterator('tests/_groups/robo') as $file) {
if ($file->isDot()) continue;
$content = file_get_contents($file->getPathname());
file_put_contents($file->getPathname(), '');
$tests = explode("\n", $content);
foreach ($tests as $test) {
if (preg_match("/(.*)suite\//", $test))
$test = preg_split("/(.*)suite\//", $test) [1];
file_put_contents($file->getPathname(), $test . "\n", FILE_APPEND | LOCK_EX);
}
}
}
from robo-paracept.
Hi @richleland
can you please check if the error still exists with the newest version?
from robo-paracept.
Hi there - our team has stopped use of PHP altogether and we haven't used codeception/robo-paracept in a few years. I don't have the means to easily test this anymore so someone else will have to give it a whirl.
from robo-paracept.
Thanks a lot for your feedback @richleland
I will close this issue.
from robo-paracept.
Related Issues (20)
- Problems with extensions FailedTestsReporter HOT 3
- GroupFilter doesn't handle dataprovider tests correctly
- update link
- Reference to missing class `\Codeception\PHPUnit\Init` HOT 1
- addFilter() method doesn't work with taskSplitTestFilesByGroups() method
- Execution time on the merged html report is incorrect (0s)
- Tag 2.1.0 dependencies too strict HOT 2
- TAG 2.0.0 dependencies too strict
- Setting maximum number of threads for taskParallelExec
- Merged report with multiple suites HOT 7
- Pass an array to the testsFrom() method HOT 2
- Depends annotation. HOT 1
- add changelog
- update changelog
- update changelog
- update changelog
- HtmlMerger failed when first file missed
- All tests passed, but summary says FAILED HOT 4
- update changelog
- update changelog
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from robo-paracept.