I need to have (I have to, it's not my decision and I cannot alter it) test-sets in both jasmine and cucumber. So I've made two folders with specs and two conf.js files, one for each framework.
When I need to run both jasmine and cucumber tests, I need to run protractor with one config and then run it again with another config.
So the question is: is there any way to make protractor run jasmine and cucumber tests consequently (e.g. first run all jasmine tests, then run all cucumber tests) in "one click"?
If you need any details about environment: I'm currently running tests in IDEA, and later there will be a Jenkins (or Hudson) job for it.
P.S.: I think, the question won't be so important when we'll use Jenkins, because we can make two jobs running one after another. But even though we might not need it, I'm still curious if it's possible.
Related
lets take one spec file in cypress in that i have 5 test cases i have to run sequentially
I am tried with npx cypress run command it will run test cases one by one is it write or wrong? i am confused.
Yes it is totally normal. Here is a link to the documentation of Cypress, which explains what Parallelization is and how to set it up.
You need to activate parallelization first, in order to use it. However it is not recommended to be done on a singular machine. It needs a significant amount of resources.
Cypress Parallelization
If your project has a large number of tests, it can take a long time for tests to complete running serially on one machine. Running tests in parallel across many virtual machines can save your team time and money when running tests in Continuous Integration (CI).
Cypress can run recorded tests in parallel across multiple machines since version 3.1.0. While parallel tests can also technically run on a single machine, we do not recommend it since this machine would require significant resources to run your tests efficiently.
This guide assumes you already have your project running and recording within Continuous Integration. If you have not set up your project yet, check out our Continuous Integration guide. If you are running or planning to run tests across multiple browsers (Firefox, Chrome, or Edge), we also recommend checking out our Cross Browser Testing guide for helpful CI strategies when using parallelization.
Turning on parallelization
Refer to your CI provider's documentation on how to set up multiple machines to run in your CI environment.
Once multiple machines are available within your CI environment, you can pass the --parallel key to cypress run to have your recorded tests parallelized.
cypress run --record --key=abc123 --parallel
Running tests in parallel requires the --record flag be passed. This ensures Cypress can properly collect the data needed to parallelize future runs. This also gives you the full benefit of seeing the results of your parallelized tests in Cypress Cloud. If you have not set up your project to record, check out our setup guide.
Source: Cypress Documentation
By default, running 'npx cypress open' opens the Cypress window and then I have to manually hit the "Run All Tests" button to run them.
How can I keep the browser open and run all tests in the browser/UI automatically?
Can I keep a scheduler on each test case so that the test runs in a particular time?
How can I push the cypress framework to higher environments?
I need the tests to run automatically everytime. I want to keep a schedular on the test case and make it more customizable and also want to push to another environments.
I'm not sure why you would need to monitor all the tests in headed mode. It can take up resources. Most of your questions can be easily answered in the Cypress Docs
npx cypress run --headed to run all tests in headed mode.
You'll need to use a CI tool for scheduling that(ie. Github actions, CircleCi, etc).
To test other environments you'll have to figure out a configuration to run on each one.
Cypress docs are your friend.
Iam using Selenium Cucumber Maven framework with Junit. How can we run cucumber feature files in parallel from Command line. I am very thankful if you guys help me. Please help me with a solution.
Have a look at this article https://automationrhapsody.com/running-cucumber-tests-in-parallel/
First of all you need to write (or generate) runner classes for each feature file. Next configure the maven-surefire-plugin to run tests in parallel. If you are using maven-failsafe-plugin look at https://maven.apache.org/surefire/maven-failsafe-plugin/examples/fork-options-and-parallel-execution.html for the configuration.
Be careful in which setup you run the tests. I would recommend you to setup a selenium grid with one master and multiple slaves to avoid hardware restrictions and of course concurrency issues.
I want to set up Jenkins for a decent build chain for a JavaFX application that controls a robotic arm and other hardware:
We are using BitBucket with the Git Flow model.
We have 2 development modules and 1 System Test module in IntelliJ that we build with Maven.
We have Unit tests, Integration test and System tests. Unit and Integration tests use JUnit and can run on the Jenkins master, for the System tests we use TestNG and they can run the TestFX tests on a Jenkins agent.
(I think TestNG is more suited for System tests than JUnit)
Development build project (build, unit+integration tests) was already in place. The Test chain has been recently set up by copying the development project, adding the system tests and ignoring the Unit/Integration tests. (so building the application is done twice)
We have 2 types of System tests:
Tests that are fairly simple and run on the application itself
Tests that are more complex and run on the application that interacts with several simulators for the robotic arm
Now I need to set up the 2nd type of tests.
My question would be: what is the best way to set this up in Jenkins?
I'm reading about Jenkins Pipelines and the Blue Ocean plugin here, about a matrix configuration project here. To me it is all a bit confusing what is the ideal way to achieve my goals.
I have no clue how to scale from a testng.xml file in my SystemTest module to flexible tests.
Can I put a sort of capabilities tag to tests so that the correct preconditions are set? For example, for tests in category 1, only the main application needs to be started for TestFX. However, for tests in the category 2, several simulators needs to be started and configured. I think using a sort of capabilities tag, will make this much more maintainable.
My goals:
Easy to maintain Jenkins flow
Efficient building, so preference to copying artifacts instead of building a second time
Possibility to split the system tests over multiple agents, preferably without me having to be concerned about what runs where (similar to Selenium Grid)
Correct dependencies (simulators etc) are started depending if the test needs them
We are looking into running the tests on VMs with OpenGL 3D acceleration due to a canvas used in the application. If tests are able to allocate, start, stop VMs on demand, that would be cool (but would only save some electricity)
Easy reporting where all test results are gathered from all agents. Notice that I prefer the JUnit report that highlights which tests were #Ignored. TestNg report format, doesn't say anything about #Ignored tests.
Have anyone tried running test cases in parallel using NUnit 3.2? I have few thousand test cases written using NUnit(2.6.3) and i want to run them in parallel. Since NUnit 2.6.3 don't have the feature to run test cases in parallel, I thought of switching to NUnit 3.2. When i read the documentation, it says it support running test fixtures in parallel not test cases. Some web site says NUnit 3.2 support running test cases in parallel. I'm confused. Any help much appreciated.
NUnit 3 intends to allow running all kinds of tests (suites, fixtures, simple test methods, test cases) in parallel.
As far as NUnit 3.2, we only run tests in parallell down to the fixture level. The test methods/cases under the fixture run one at a time. So long as you have a relatively large number of fixtures, this gives an equivalent performance increase to running the methods in parallel. However, in the extreme, for example with a single fixture and 1000 methods, you will see no improvement.
No promises, but I imagine we'll be running test cases in parallel for 3.4.