I'm writing an API using a non-rails framework. I normally use Cucumber for BDD and testing of API's when I'm writing them in RAILS.
Is there a strong reason not to use Cucumber when I'm testing an API written on top of node.js (or any other framework, really)?
Strong technical reasons to not do this might include:
Dependency of Cucumber on Rails
The existence of a better framework for node.js
Some other technical reason I don't know about.
First of all, Cucumber doesn't depend on Rails.
I have been trying out some different javascript testing frameworks to try to work out what I want to use. So far I like mocha with expect.js for unit testing but I haven't found anything for integration testing a node app that I'm happy with. It's possible to do with mocha and supertest, and I've also tried cucumber.js which is getting there but it's not as mature as the Ruby version - so that's what I intend to use.
I can't think of a good reason not to do this, apart from it may be harder to do things like set up fixtures - but that may well be a good thing as it would force your tests to deal only with the public interface of your API - as it was intended to be used.
As said cucumber has nothing to do with rails.
You could perfectly use it to test API's written in any languages.
In case you want to use node.js full stack cucumber.js is a good option.
Related
My team is currently starting to develop a web application with vue.js. We are currently discussing the test framework and a team member prefers cypress. The only issue is, that cypress is not cross platform testing framework. We have requirements to support Chrome, Safari, Edge, tablet and mobile devices.
Most of the modern frameworks such as vuejs promise cross platform functionality. And the raised discussion that we had in the team is the need of cross platform testing. Is it still so important in 2018(almost 2019) to do cross browser and cross OS Platform tests? What do you use for testing and how do you test your web application?
Thank you in advance for your answers.
Of cource the alternative is Selenium using selenium wrappers like Protractor or Webdriver.io or Nightwatch.js.
For same reason, we are not using Cypress. We are using Nightwatch.js. Coz in the above list of wrappers it only has everything inbuilt like cypress. For others in the list we have to find the respective npm for test runner, assertion reporting, parallelisation, etc.
Mainly we have choosed it for internal test runner and junit xml reporting for ci which it gives along with selenium wrapping functionality.
Also one more good thing cypress is working on cross browser support. Recently they have progress in firefox browser.
Refer this issue tracker
We have this same dilemma at my organization. I find Cypress so easy to use that I am ok using it for 99% of my test (that does not include my unit or api test). If I need something special for another browser, which is probably going to be minimal, I would then use a selenium wrapper, for me that would be protractor since we mainly do Angular. I hear a lot of argument not to choose cypress due to the issue that it currently only runs in Chrome, I think sometimes it is an excuse for someone to hate it because they don't want to learn something new. I would bet 90% or more of your test cases Cypress will be just fine, where I need something else I do something else. When I look at the testing triangle, I know most of my test should be UNIT test so I don't have enough UI automation test to worry about it. I will say I have ran into this same argument at my job from developers who say why don't use protractor, and they have the freedom to use protractor, but I notice they never get around to using it. They like to argue about what someone else wants to do, but then they don't even use what they say they prefer. I would ask myself what is going to be the cheapest to implement and be the most effective for me. For me that is mainly cypress and then protractor if I have some special case..
So I've been automating tests for some time, but I honestly don't think I completely understand how the tools I am using are fundamentally related to one another. I actually feel a bit embarrassed but this was the toolbox handed down to me and I just ran with it. I've since put it to incredibly good use, which I'm very grateful for.
So I'm using the following, which if I'm not mistaken is fairly common nowadays: selenium-webdriver, rspec, capybara, chromedriver
What is the relationship between all of these that allow me to accomplish what I do on a daily basis?
RSpec is the test runner framework.
Capybara is a tool for emulating user behavior on a web page, and verifying the existence of content on those web pages, there are a number of drivers for it. It comes with rack-test and selenium-webdriver drivers.
Selenium-webdriver is used to integrate with the selenium web automation framework, it supports using firefox out of the box.
Chromedriver allows selenium-webdriver to control googles chrome browser
Does anybody have a recommendation for unit testing home grown rally apps?
I've started to look at Jasmine as recommended in the Sencha docs and it looks promising, but I'm a little unsure about how to tie in all the Rally infrastructure, and I'm not a Javascript expert.
If anybody has used Jasmine for this, do you have some examples of how to set up a basic configuration for using Jasmine to test a SDK2 Rally app?
One of the next things I wanted to create in my app building framework was a tie to some testing framework. I was leaning towards Zombie, you may want to check that one out.
My team creates a number of dynamic/data-driven websites. We use a CruiseControl.NET to download the code, create test data, run unit tests, and install each site into IIS for manual testing. However we haven't found a good tool (or tools) that can actually run through some simple tests of the websites, such as checking for broken links or invalid HTML.
Are there any good tools that we can incorporate into our build process to automate basic website testing? E.g. check for broken links, check for HTML/JavaScript/CSS coding errors, and so on? Load testing would be great too.
Looking for something totally generic; we don't need to write/record scripts for playback. Just something to cover the basics.
Thank you!
-James
For link checking you could always look at http://linkchecker.sourceforge.net/ if that isn't suitable they list other alternatives.
It also seems like it is an active project.
JSLint does javascript validation and there are two options for executing it via the commandline so that might be worth a look too http://www.jslint.com/
I am wondering what tool(s) do you use for front-end testing...
Currently I am using Selenium RC as tool to test the front-end. I am quite happy with the result as I managed to integrate it with the ms build process etc. The problem with Selenium tests is that they are not always reliable especially if you browse with something else than Firefox.
I am looking for open source alternatives (tools for front-end testing)?
I'd recommend TestPlan which can use Selenium as a backend, or HTMLUnit. It also allows you to do a myriad of other testing. It also works around several of the problems Selenium has, making it a bit easier to user than Selenium directly.
My experience shows, Selenium works the best from everything I tried. Even now I work with Firefox 6 and Selenium IDE works perfectly with it.
Together with selenium, we're also using twill. However, it is because of its speed and it is used only for "quick & fast" tests, I'm afraid not a lot of things are better then selenium out there.
On the other hand, I find Selenium quite reliable, even in another browsers - it's just hard to build tests in such way, to think about race conditions etc.
Have you heard of Watin ?
There is a great tool named cypress.
With cypress it is possible to write
End-to-end tests, Integration tests & Unit tests.
It is open source.
Learning curve is very low.
https://docs.cypress.io/guides/overview/why-cypress