In VSCode there is a option about for testing. There you can select which tests you want to run. Also you can select testing profiles. But there i can only select robotframework profile or python profile. A cant find anywhere to create new profiles.
The thing i want to create is to run tests via that screen with some kind of run configuration. Because i have some environment variables. These aren't used when i run the tests from that screen.
I think the robotframework language server from Robocorp installs this plugin in VS code
Does somebody now how to use that?
Testing screen
Related
I have a big web project with a separate backend and a front-end (webpack). I'm going to use Cypress to create end-to-end tests.
What is not clear is where I should add the Cypress tests and Cypress itself. The documentation says to add it right to the testee project and it shows how to run the tests on the production website (which URL is different from the local, dev project). This means that I'm not able to run the tests on the development project because Cypress testing IDE and the testee project can't be run simultaneously because they share the same terminal.
If so, the best solution is probably to organize one more project, only for testing purposes, and having only Cypress installed and tests themselves? Is it a good practice and if so, which project should it be?
We have the same setup at work. We include the Cypress folder in the front-end repo. I'd agree with keeping it right next to the project because you have access to that code easily i.e. accessing utility functions, selectors, etc. As far as the terminal issue, you should be able to run your project locally in one terminal tab and the cypress test runner in another.
I'm trying to improve the testing process where I work, but without adjusting the structure.
What we have: VSTS, Selenium IDE, Testers who write test cases, but not code.
What I'd like to do is manage a way to marry our TFS continuous integration with the Selenium tests we write. These are NOT the code-driven selenium tests, but rather the IDE version where users click through, and set assertions using the IDE (All are just UI tests). I know we can export those tests plans as a .SIDE file, but what I can't figure out, is how to have our TFS server execute those as part of a deployment or build pipeline.
Ideally, developers/devops would setup projects in TFS from the onset with whatever solution makes sense to execute these Selenium .SIDE files, but afterwards, the testers would manage adding/modifying those tests cases elsewhere.
The real goal here is to not have testers writing code, or checking in code. Only writing these UI Selenium tests, but having TFS execute those as part of CI.
Researching this on the internet drives me basically always to something that requires testers to write code.
I don't think it can automate testing without code, at lease, you need a test project containing your automated tests.
Generally, in Azure DevOps, we use Visual Studio Test task to run tests. This task supports using the following tests:
Test assembly: Use this option to specify one or more test assemblies that contain your tests. You can optionally specify a
filter criteria to select only specific tests.
Test plan: Use this option to run tests from your test plan that have an automated test method associated with it. To learn more about
how to associate tests with a test case work item, see Associate
automated tests with test cases.
Test run: Use this option when you are setting up an environment to run tests from test plans. This option should not be used when
running tests in a continuous integration/continuous deployment
(CI/CD) pipeline.
This was a question that I had as well, and I think I found an imperfect but better solution.
I wasn't able to get my Selenium IDE tests running with Jenkins, but I was able to get them to run with TeamCity, another CI.
I created a build step like the following :
Runner type: Command Line
Working Directory: where the selenium IDE .side file is located
Run: Custom Script
With the build script content that I usually use to run my Selenium IDE Tests, such as selenium-side-runner sidefile.side
I also added the following so I could output the results in Junitor another form: --output-directory=results --output-format=junit
You can also add the following so the tests are run headlessly, this only works in Chrome : -c "goog:chromeOptions.args=[--headless,--nogpu] browserName=chrome"
Finally, I also use --filter to run one test suite at a time, but that is optional too.
I then used another build step to export the results to our test manger, xray, but I think that is beyond the scope of this question.
The problem with this solution is that it runs directly from a users individual machine still, but this can be work around.
Currently, I am doing automation UI tests with testcafejs for React project.
I would like to run these tests in continuous integration environments such as Jenkins. I already add browserStack plugin to run them locally with different browsers and operating system.
However, I would like to integrate them into Jenkins but not always consuming browserStack quota for daily checks. Any suggestions for how to run them within different browsers in Jenkins?
TestCafe has an extensive command line interface that allows it to fit well in any popular continuous integration system.
Here are instructions on how you can integrate TestCafe with Jenkins. The up-to-date KB article can be found in this documentation topic for the TestCafe Open Source version:
Integrating TestCafe with Jenkins CI System
If you are using the legacy TestCafe version (version 15.1), you can use the following KB article:
How to integrate TestCafe with Jenkins
You may also wish to check the TestCafe plugin for Jenkins that attaches screenshots and videos to the Jenkins test results page.
Step 1 - Fetching Test Code From a Repository
Here, we will use tests published in a separate repository on GitHub - ci-integration-demo. If you use a different version control system, search for a plugin that integrates it with Jenkins.
Open your project and choose Configure from the right pane.
Scroll down to the Source Code Management section and select Git, then specify the Repository URL.
Step 2 - Adding a Command to Install TestCafe
Go to the Build section, find a step that builds you application and add a new step right after it. To do this, click Add build step and select a step type that runs a shell command.
In the Command box, type the following.
npm install testcafe testcafe-reporter-xunit
This command installs the main testcafe module and a plugin that saves test run reports in the xUnit format.
Step 3 - Adding a Command to Run TestCafe
Add another step that executes a shell command after the previous one. This step will run TestCafe.
Type the following command.
node_modules/.bin/testcafe chrome tests/**/* -r xunit:res.xml
This runs TestCafe tests from the tests directory in Google Chrome. Test results are saved to the res.xml file in the xUnit format.
Step 4 - Publishing Test Run Reports
Go to the Post-build Actions section and click Add post-build action. In the drop-down list, select Publish JUnit test result report.
In the Test report XMLs field, specify the test report file: res.xml.
Step 5 - Run the Test
Click Save and you will be navigated to the Project page.
Hit Build Now to build the project immediately.
Step 6 - View Test Results
In the Build History section of the Project page, click a build and select Test Results from the drop-down menu.
Jenkins will display a test run report where you can see general information about testing results. You can click individual tests for details.
I am currently working on node-webkit based desktop app. I was searching for a way to do automation testing for this . But most of the automation tools required a server to start up but in my case i have on but it runs in the chromium that comes by default. Is there a way to automate UI acceptance test for nwjs apps.
Take a look at the NW.js Wiki under How to run node webkit's test cases
You will need to setup the chrome driver in order to use selenium for example
Once you have those, check out Yaniv kessler's blog post on how to Automate NW.js UI testing using mocha.
I have some Selenium IDE scripts for automating tasks (deploying to an internal server via it's web interface), and I want to have bookmarks to launch them.
Don't want go to Tools -> Selenium IDE -> search test -> launch test, just want to click a bookmark and let the script run.
How can I achieve this? Am I missing a point?
Don't know if it makes a difference, but I'm currently using Firefox (if I have to change browser for this, it wouldn't be a problem).
Thanks
Not sure whether you be able to run tests pressing on a bookmark as browser plugins are usually run with a key combo. And bookmark is URL. Well the main issue in your question how to associate bookmark
with browser addon launching.
Well, I've investigated a lil bit workaround. Speaking about getting Selenium HTML Test Suites Running Automatically (i mean an alternative to bookmarks) some solutions are possible:
solution 1:
Patch the Selenium server code to support HTML suites.
Build a script to execute your HTML test suites.
Build a script to read the suites’ output reports and consolidate
the information for inclusion into your CC.NET report.
Setup details you can get here
Solution 2:
Selenium IDE plugin for Firefox to create tests
Java to run Selenium Server
Selenium Server to run test suites
Nant to generate reports for CruiseControl.NET
CruiseControl.Net as a continuous integration engine
Setup details here
Hope this be useful for you.
Bookmarks are nothing else than URLs, which makes it impossible to "bookmark" a functionality of a plugin, such as the Selenium IDE.
However, there might be other plugins out there that do what you want. I haven't had a closer look at it, but one candidate could be the Favorites (Selenium IDE) Firefox Add-on.