my cucumber tests are not able to execute when i use runner class - bdd

I have two feature class in framework, and now I am not able to run MenuTest.resources feature class.I have checked multiple times whether my feature file should not have any error but no luck.

Related

How to run in a specific order many e2e files with Detox with Jest for a React Native app?

As stated I'm testing a React Native app with Detox (and Jest) and I'd like to have several e2e files with different purposes -e.g.: login, fill a form and so- and run them in a specific order (the log in e2e file should go first). Running them in random order wouldn't do the job.
The goal is to avoid having one huge file.
Note: I'm running the tests on iOS simulator.
Short answer: you can't, but keep reading.
Jest's conceptual model is that each test file is a unit and is totally isolated from the others. It makes things easier to reason about and it allows parallelisation. If your tests need to be run in a specific order then they are logically a single unit so need to be specified in a single test file.
However that doesn't preclude you from splitting your tests into several files. You can have one file which Jest recognises (e.g. full-suite.e2e.js) and have that file include several others (e.g. login.js, forms.js, etc.). That way Jest runs everything as one file, in your specified order, yet you can organise your individual tests in a way that makes logical sense to you.

Running SpecFlow tests without the feature files included in the solution

I run my SpecFlow tests without code-behind - or rather, with code-behind generated at run time.
This lead me to thinking that, if there is an established step definition library, could the *.feature files be added to the solution at run time?
Going further, is there an API to pass feature files to SpecFlow dynamically so that it can generate and execute their code at run time?

Running single class Tests on TFS Build

I have some unit tests in single class "test.cs" and which runs on Visual Studio 2015. Now I want to configure the tests on TFS build. I tried with below configuration and not success.
Builds->Edit Build Definition->Process->Test->1.Automated Tests->1.Test source->Test Source spec=**\*test.cs
How to configure the build definition to run single class tests on TFS build?
Make sure you specify the test assembly as the test source as Deepa mentioned:
You could then use the criteria to specify the specific class you want to run tests from using:
FullyQualifiedName~NameSpace.Test
However pinning your build on a single class to run tests isn't a good practice. If you are using MSTest, consider using test categories:
If you have created automated tests using Visual Studio you can manage
these tests by categorizing them with test categories. When you run
these automated tests using Visual Studio, Team Foundation Build, or
mstest.exe, you can use these test categories to easily select which
tests you run. You add test categories as attributes to your test
methods.
source: MSDN
These will give you some more flexibility and prevent the build from no longer running test if you rename the class or anything
In your criteria specify the use the category to filter the tests that will run:
TestCategory=MyCategory
There is some more info about the criteria you can use in this blog post. The screenshot are taken from a build definition using the GitTemplate.12.xaml template.

TFS Build Definition Ignore Coded UI Tests

We recently added Coded UI Tests to our solution. The tests complete successfully when ran through Test Explorer but when the code is checked in and a build is triggered, all the CUIT's fail (error message is below).
I have gone to each of the links in the error message. The first one details how to set up a test agent to run the tests. We don't really need tests on all our environments as we are setting up a lab environment to run them and adding the test agent would require me submitting a ticket which would probably take months to get a response back, not to mention walking the person through what needs to be done.
The second link is dead and I'm pretty sure I don't want to change the build to be interactive.
I am hoping there is an easy way to change the build definition (which I have access to) so that it can ignore all Coded UI Tests but still run the Unit Tests. Is this possible? Is there an easier way of going about this? Each set of tests have their own project file, all Coded UI Tests in one project and all Unit Tests in another project.
Thanks in advance.
Here is the error that is on all of the coded UI tests:
Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: Microsoft.VisualStudio.TestTools.UITest.Extension.UITestException: To run tests that interact with the desktop, you must set up the test agent to run as an interactive process. For more information, see "How to: Set Up Your Test Agent to Run Tests That Interact with the Desktop" (http://go.microsoft.com/fwlink/?LinkId=255012)
If you are running the tests as part of your team build, you must also set up the build agent to run as an interactive process. For more information, see "How to: Configure and Run Scheduled Tests After Building Your Application" (http://go.microsoft.com/fwlink/?LinkId=254735).
One thing you can do is to group all the coded UI tests into a particular test category and exclude running those in the build. We do this with our "integration" tests and only choose to run our true unit tests for speed reasons.
See below link for how to use test categories:
https://msdn.microsoft.com/en-us/library/dd286683.aspx
Also see the below for how to edit your build definition to only run the tests you want:
Excluding tests from tfs build
You can use use some naming patterns and combine that with the Test case Filter option in the execute test step:
https://jessehouwing.net/xaml-build-staged-execution-of-unit-tests/
Something like:
FullyQualifiedName ~ .Ui.
This would require the Ui tests to have .Ui in the namespace

Load balance execution of UI tests (Selenium) on multiple identical app instances (URLs)

I am trying to run UI tests on multiple identical instances of the web application. For example, let's say the identical version of the application is available at 3 places:
https://some1.app.com
https://some2.app.com
https://some3.app.com
The intended system should check which instance is available and run a test (that is not already run) on it. It should be able to run 3 tests on the 3 instances simultaneously in the Jenkins environment.
I have explored the Jenkins Matrix Configuration, but that appears to run all tests on all possible combinations in the matrix. My intention is to divide and load balance the tests, not run on all combinations. Any ideas on how this can be done?
I am using JUnit4 with Ant for running the tests on Jenkins.
One solution would be a Matrix Project Plugin. You could configure your url as parameter a bit like in here: Building a matrix project

Resources