Missing tests in Cypress - visual-studio-code

Yesterday created folder "integration" through Visual Studio Code and added my tests in it, but Cypress do not see them. Then, moved tests to already exists folder "2-advanced-examples" and tests run fine.
Today I started Visual Studio Code and I see my tests in folder "2-advanced-examples" but missing them in same folder when start Cypress. Cypress removed my tests by unknown reason.
Any ideas about correct way to add my tests without to be removed again?
*Added screenshot from VSC and Cypress.
What I did for resolving: Restart Cypress, re-added tests to folder "2-advanced-examples".
Expected Cypress to display my tests.

Related

How can I convince eclipse/JUnit4 to find all my tests, in a gradle/eclipse project?

Background
JUnit 4 test runner, within Eclipse 4.11.
I have an eclipse project that was imported from a build.gradle file. This project has several different source paths, each with their own test path.
main/java, test/java, foo/java, fooTest/java, fooTest/resource, and so on.
Problem
When I run a "whole project" JUnit configuration (debug, run, code coverage, whatever), all it finds are the tests within "test/java". I have successfully added new test classes and new #Test methods within this folder.
Tests from any other source path are ignored when I try to "Run all tests in the selected project, package, or source folder". Furthermore, selecting the specific source folder 'fooTest/java' errors out with the message "No tests found with test runner 'Junit 4'". However, when I use the "Run a single test" option with a specific test class, it finds all its test methods just fine. I can specify a particular method and the test runs just fine.
Stuff that didn't work
I tried changing the output directories of my non-main test source paths to write to the same folder as my working test source path. No joy.
I tried various settings of Eclipse's "Contains test sources" flag for my different test source paths. On or off, the behavior is the same across all my test source paths. /test/java is always found, fooTest/java is always missed. No, I haven't tried all 16 permutations of the flag across my 4 different test source paths.
I tried ripping out all the gradle-related stuff from the .project and .classpath. No change in behavior. Dammit... got my hopes up.
I tried changing the order of the <classpathentry/> in the .classpath project file. When I moved test/java such that it was no longer the first test path, I once again got the "no tests found" error, just like when I aimed the junit configuration "run all tests in the selected project, package, or source folder" at one of my other test source folders. Putting it back restored the original behavior.
Does anyone have further suggestions I could try to make my remaining tests run without individual configurations for every test class that I must manually run one at a time?
I switched to the JUnit 5 test runner, and it picked up on everything just fine. It's vintage package was able to find all my JUnit 4 tests, and I've since modified several tests to use the newfangled annotations and Assertions in JUnit 5.
Perhaps this was a known bug/limitation in the JUnit 4 runner? Ah well. It works now.

Javascript Protractor - Is there any solution to run protractor test with remote node_modules?

I'm writing automation test for the angularjs web app. Using protractor and cucumber.
From beginning, I organized the test as a separate folder and actually it required different node packages from the root project(the project built up the web app).
Today there's a requirement that the node_modules of test project should be merged with the node_modules of root project.
As per my knowledge, when running the command protractor protractor_conf.js, the system looks for the node_modules in 1 level upstream folder.
I'm attaching the screenshot of my project folder to be clearer.
Appreciate all suggestions !
Thanks.
I will not recommend you not to save node_modules as the separate folder in the project directory. Instead, you can create a package.json file for your test project and list all the dependencies in the package.json file. so each time before you run protractor conf.js ,just run npm install command from the directory where your project is available. So by doing this way will help you to run the e2e scripts in different machines without depending on the node_modules folder.
Example package.json for protractor
Also, it is advisable to maintain separate node_modules for different project because it may avoid versions conflicts of any node_module that is used in both projects.

Cannot run tests using NUnit Test Runner from SpecFlow feature files

Using the current version of ReSharper (9.1) and NUnit (2.6.4), whenever I right click a feature or step in a feature file and click ReSharper's "Run Unit Tests" it throws an error and says no unit tests found.
I've found if I use the built in MSTest or if use SpecRunner, it works fine, but I lose the features of NUnit.
I can run NUnit tests fine normally, and confirmed that the proper version of NUnit is listed in my SpecFlow config, and ReSharper settings, and everything appears to line up.

FileNotFoundException when running NUnit tests from TeamCity

I am using the built in TeamCity NUnit runner to run tests stored in .DLL files.
My .DLLs are referencing other DLLs which are present in the same folder.
When running these, i am getting a FileNotFoundException for the referenced DLLs.
How can i fix this? I am thinking perhaps the TC NUnit runner is using some other dir as the main app execution folder, and thus preventing from files that are actually residing next to the test DLL to not load properly, but cannot prove this claim yet...
Anyone else encountered this behaviour?
OK the problem is solved and it is indeed silly and embarrassing:
I have set the NUnit test runner to execute these tests:
**/*.Tests.dll
This means that it will include tests from /bin/Debug/ and also from other folders, such as obj/
In these folders, no references are included of course, making the same tests run twice and some of these fail of course!
Paths are related to build checkout directory, not to any working directory. If you need another paths, use %reference% syntax to refer to TeamCity property with a directory path. Do you run it under Windows? Do you use TeamCity 6.5?
If that does not help, feed free to contact teamcity-feedback#jetbrains.com
In my case, the missing DLL was a native library and it could not be loaded because there was an incorrect version of VC runtime installed on the build agent. My solution was to add runtime DLLs (located in 'C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\redist\x86\Microsoft.VC110.CRT') directly into the project (build action = Content, copy to output directory = Copy always). This also makes installation friendlier.
Hope this helps.

Configuring to run nunit test project in teamcity

I have a vb.net project that runs nunit tests. I am struggling to even build this project right as it keeps giving the following error 'Type ' ' not defined. Any idea how to configure the teamcity to build and run scripts from project.
Maybe some code isn't checked in properly, and TeamCity can't build because of that. Try to do a fresh checkout from your repository to a new folder, and build the project/solution there.
When the project builds, then we can look into getting it to test with NUnit.