Comments (11)
Found and fixed. Will be released soon
from vscode-catch2-test-adapter.
With version 2.4.5 I still have the issue.
Adding this test to the example in the other issue ( #87 ):
TEST(failTest, emptyVector)
{
std::vector<int> v;
v.front() = 10;
SUCCEED();
}
Although one thing changed. Now when I run the test one-by-one, the wrong test resets the tests.
from vscode-catch2-test-adapter.
Thats weird. I'm pretty sure I found it and fixed it. Also I couldn't reproduce it with your way anymore.
Maybe we misunderstand each other. Please describe in details.
from vscode-catch2-test-adapter.
Describe the bug (A clear and concise description of what the bug is.)
When I click on the run tests button the tests stay gray. If I run the one by one the first become red as
it should, then on the second both tests become gray. I hope this description helps, and sorry but the log become quite long.
To Reproduce (Steps to reproduce the behavior:)
- Test main.cpp:
#include <gtest/gtest.h>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
TEST(cwdTest, fileReadTest)
{
std::ifstream file("test.txt");
ASSERT_TRUE(file.good());
std::string str;
getline(file, str);
EXPECT_EQ(str, "asd");
}
TEST(failTest, wrongIndex)
{
std::vector<int> v;
v.front() = 10;
SUCCEED();
}
int main(int argc, char** argv)
{
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
Desktop (please complete the following information):
- Extension Version 2.4.5
- VS Code Version 1.33.1
- Google Test Version 1.8.1-2
- OS Type and Version Windows 10 - 1809
Log (Attach log. (optional, Set: catch2TestExplorer.logfile
and reproduce the bug.) Warning: Log probably contains file and test names too.)
The log after runing all the tests (The user directory is replaced to %userprofile%)
[2019-04-28 20:06:08.930] [INFO] [at GoogleTestSuiteInfo._runInner (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\AbstractTestSuiteInfo.js:69:26)] proc starting: cwd_test.exe
[2019-04-28 20:06:08.946] [INFO] [at GoogleTestSuiteInfo._runInner (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\AbstractTestSuiteInfo.js:75:26)] proc started: cwd_test.exe e:\code\cwd_test\build\cwd_test.exe [ '--gtest_color=no' ] { cwd: 'e:\\code\\cwd_test\\build',
env:
{ C2TESTEXECUTABLEPATH: 'e:\\code\\cwd_test\\build\\cwd_test.exe' } };
[2019-04-28 20:06:08.978] [INFO] [at processChunk (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\GoogleTestSuiteInfo.js:204:46)] Test cwdTest.fileReadTest has started.
[2019-04-28 20:06:08.978] [INFO] [at processChunk (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\GoogleTestSuiteInfo.js:219:46)] Test cwdTest.fileReadTest has finished.
[2019-04-28 20:06:08.978] [INFO] [at processChunk (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\GoogleTestSuiteInfo.js:204:46)] Test failTest.wrongIndex has started.
[2019-04-28 20:06:08.981] [INFO] [at ChildProcess._runInner.runInfo.process.once.args (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\AbstractTestSuiteInfo.js:85:34)] proc close: cwd_test.exe [ 3221225477, null ]
[2019-04-28 20:06:08.981] [WARN] [at _handleProcess.Promise.catch.then (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\GoogleTestSuiteInfo.js:270:38)] data.currentChild !== undefined: { buffer: '[ RUN ] failTest.wrongIndex\r\n',
currentTestCaseNameFull: 'failTest.wrongIndex',
currentChild:
GoogleTestInfo {
_shared:
SharedVariables {
log:
Log {
configSection: 'catch2TestExplorer',
workspaceFolder: [Object],
outputChannelName: 'Test Explorer: cwd_test',
inspectOptions: [Object],
includeLocation: true,
targets: [Array],
nextInspectOptions: undefined,
configChangeSubscription: [Object] },
workspaceFolder: { uri: [p], name: 'cwd_test', index: 0 },
testStatesEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i],
_deliveryQueue: [] },
loadWithTaskEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i],
_deliveryQueue: [] },
sendTestEventEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
retire:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
rngSeed: null,
execWatchTimeout: 10000,
_execRunningTimeout: null,
isNoThrow: false,
enabledTestListCaching: false,
_execRunningTimeoutChangeEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
onDidChangeExecRunningTimeout: [Function] },
testNameAsId: 'failTest.wrongIndex',
label: 'wrongIndex',
skipped: false,
file: 'E:\\code\\cwd_test\\main.cpp',
line: 15,
type: 'test',
description: '',
lastRunState: undefined,
lastRunMilisec: undefined,
id: '14',
origLabel: 'wrongIndex',
tooltip: 'Name: failTest.wrongIndex' },
group:
GoogleTestGroupSuiteInfo {
_shared:
SharedVariables {
log:
Log {
configSection: 'catch2TestExplorer',
workspaceFolder: [Object],
outputChannelName: 'Test Explorer: cwd_test',
inspectOptions: [Object],
includeLocation: true,
targets: [Array],
nextInspectOptions: undefined,
configChangeSubscription: [Object] },
workspaceFolder: { uri: [p], name: 'cwd_test', index: 0 },
testStatesEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i],
_deliveryQueue: [] },
loadWithTaskEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i],
_deliveryQueue: [] },
sendTestEventEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
retire:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
rngSeed: null,
execWatchTimeout: 10000,
_execRunningTimeout: null,
isNoThrow: false,
enabledTestListCaching: false,
_execRunningTimeoutChangeEmitter:
u {
_disposed: false,
_options: undefined,
_leakageMon: undefined,
_event: [Function],
_listeners: [i] },
onDidChangeExecRunningTimeout: [Function] },
label: 'failTest',
description: undefined,
type: 'suite',
children:
[ GoogleTestInfo {
_shared: [SharedVariables],
testNameAsId: 'failTest.wrongIndex',
label: 'wrongIndex',
skipped: false,
file: 'E:\\code\\cwd_test\\main.cpp',
line: 15,
type: 'test',
description: '',
lastRunState: undefined,
lastRunMilisec: undefined,
id: '14',
origLabel: 'wrongIndex',
tooltip: 'Name: failTest.wrongIndex' } ],
origLabel: 'failTest',
id: '13',
_tooltip: 'Name: failTest',
file: 'E:\\code\\cwd_test\\main.cpp',
line: 0 },
beforeFirstTestCase: false,
unprocessedTestCases: [],
processedTestCases:
[ GoogleTestInfo {
_shared:
SharedVariables {
log: [Log],
workspaceFolder: [Object],
testStatesEmitter: [u],
loadWithTaskEmitter: [u],
sendTestEventEmitter: [u],
retire: [u],
rngSeed: null,
execWatchTimeout: 10000,
_execRunningTimeout: null,
isNoThrow: false,
enabledTestListCaching: false,
_execRunningTimeoutChangeEmitter: [u],
onDidChangeExecRunningTimeout: [Function] },
testNameAsId: 'cwdTest.fileReadTest',
label: 'fileReadTest',
skipped: false,
file: 'E:\\code\\cwd_test\\main.cpp',
line: 6,
type: 'test',
description: '',
lastRunState: 'failed',
lastRunMilisec: 0,
id: '12',
origLabel: 'fileReadTest',
tooltip: 'Name: cwdTest.fileReadTest' } ] }
[2019-04-28 20:06:08.982] [INFO] [at _runInner._handleProcess.catch.then (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\AbstractTestSuiteInfo.js:121:30)] proc finished: e:\code\cwd_test\build\cwd_test.exe
[2019-04-28 20:06:08.982] [INFO] [at GoogleTestSuiteInfo.reloadChildren (%userprofile%\.vscode\extensions\matepek.vscode-catch2-test-adapter-2.4.5\out\src\GoogleTestSuiteInfo.js:26:26)] reloadChildren cwd_test.exe
from vscode-catch2-test-adapter.
When I click on the run tests button the tests stay gray.
For me the "failTest" become a red triangle and the cwd_test stays grey? Isn't this the same for you?
Please confirm again.
from vscode-catch2-test-adapter.
Szia. írd már le magyarul mi a baj, mert nem biztos hogy értjük egymást :)
from vscode-catch2-test-adapter.
Először is: Lol :D
Igazából nehéz jobban körül írni a dolgot de megpróbálom. Szóval ha az összes tesztet együtt futtatom akkor szürke marad minden. Ha előbb a cwdTest-et futtatom az lefut és a 2.4.6 óta zöld pipa lesz. Utána ha lefuttatom a failTest-et akkor megint minden szürke lesz. Piros háromszöget még nem láttam.
from vscode-catch2-test-adapter.
Jól van, így értettem, csak nem tudtam reprodukálni, és gondoltam talán kommunikációs hiba van. Lehet platform specifikus. Majd ha Windows elé jutok, csekkolom.
from vscode-catch2-test-adapter.
Yepp, it was a windows specific one.
from vscode-catch2-test-adapter.
Thanks, now it works as expected, although the log became quite long. It's not really an issue, but worth noting.
from vscode-catch2-test-adapter.
I suggest to you to disable it. In that case it has no impact on the performance at all.
from vscode-catch2-test-adapter.
Related Issues (20)
- Add access to gdb command to modify arguments HOT 4
- Require build success before allowing a test to run HOT 2
- Status bar name is just "Extension status", and not ex. "TestMate C++". This makes it hard to find it if you want to hide the status. HOT 1
- Documentation does not mention case-sensitivity for file search globs HOT 1
- executionWrapper not working as expected HOT 7
- Filter tests by tags HOT 1
- Simplify finding test executables (remove advancedExecutables) HOT 1
- Improve performance by allowing "Files: exclude" rules when collecting test binaries HOT 11
- Add custom file extension pre-filter HOT 2
- The ambiguous explanation of the test.parallelExecutionLimit and the test.parallelExecutionOfExecutableLimit HOT 5
- Bazel, Runfiles, and C++ TestMate - how to use properly? HOT 11
- runTask always reporting "Task not found" HOT 2
- Parallel execution requires per-instance unique identifiers HOT 5
- fail to loading testing binary HOT 7
- Don't re-indent `std::cout` output HOT 1
- [Catch2] Custom main file not being picked up HOT 3
- Implicit gtest_filter fails when running 300 tests HOT 1
- Different configTemplate depending on executed tests HOT 4
- Should files.watcherExclude be honored when finding tests? HOT 5
- Label merging is broken after adding current working directory in the advanced executables configuration HOT 8
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 vscode-catch2-test-adapter.