4

The app uses a javascript framework to update the single page. Ajax is used for data updates

How I can automate user acceptance testing for it? Usually I use selenium through through the capybara DCL vis rspec.

Would that work for a single page app? I am already familiar with and use several implicit 'wait for element to appear' strategies. Will these strategies still work ok for a javascript and ajax based application ?

The automated javascript unit testing will be done within the javascript framework which could be angular, ember or vue

5
  • 1
    Yes, my first step would be to mocking the web services and use data driven testing to prove the front end. I would use SOAPUI to separately prove the AJAX contracts. Jun 29, 2017 at 10:50
  • 5
    Closing mafia: At least have the guts to add a comment to say why, if you want to abuse your powers to close a perfectly valid question. Yes you can vote to close, but it does not mean you should. You are supposed to exercise your brains too, not just a twitchy finger. With great powers come great responsibility Jun 29, 2017 at 14:20
  • 1
    Thanks Peter! I do wish more folks could try and help when they think a question they think is off. I mean I saw a question with all content being in a foreign language the other day with close votes. I went ahead and used google translate to fix it in about 15 seconds. I welcome edits as I think of all questions as idealized for others in the same situation and not personal to me. Jun 29, 2017 at 16:36
  • Why cant you try it out Sahi(sahipro.com) since it works same as on Javascript and automatically waits for page loads and Ajax activity. No need to write script in Sahi hence it follows record and playback method.
    – priya
    Nov 9, 2017 at 8:54
  • You tagged the post with unit-tests but you're asking for user-acceptance-testing. To me user-acceptance-testing is end-to-end testing involving integration of all (or most) of the components. Why tagging with unit-tests then?
    – dzieciou
    Dec 9, 2017 at 20:49

1 Answer 1

1

Considering page loading issues in Single page applications, especially if its angular, then definitely I would suggest going for Protractor with Jasmine/Or Mocha with Chai.

If it is a non-angular application, then you may use choose webDriverJS(selenium JavaScript binding) as well.

In terms of syntax, Jasmine similar to RSpec is a BDD framework, in case you are not aware of.

For JavaScript unit testing, you may utilize the same structure of tests with Jasmine and Karma.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.