Acceptance Testing Rails using a "Testing API" for client side state control -


i evaluating how test rather big , complex web application, based on rails 4 on server side , emberjs on client side. in our app, client exclusively communicates through restful json api server.

we did lot of unit testing based on konacha far , willing setup integration/acceptance tests too. not sure whether should start writing end-to-end tests, tests including running instance of our server, or whether should go integration testing api , client side separately.

our preferred choice @ moment end-to-end testing, because fear in case of integration testing api , client separately have twice effort of creating , maintaining tests , there might tiny, little specialities of comunication between api , client not catch.

well, modern & fast testing frameworks konacha, don't want use selenium. not because feels little bit old, because performance quite poor. still need control instantiation of mock data on server , reset of server, why came following approach:

we implemented testing api conceptually used control state of server, e.g. has following methods:

get /api/test/setup  # simple bootstrapping of database, e.g. populate table iso language codes etc... /api/test/reset  # reset database, using `database_cleaner` gem 

a konacha test case call setup , reset, before , after each test case respectively.

what think approach?

not sure call test of api , client separately, if think running kind of test, still should got end-to-end test.

so yes, think idea of going end-to-end testing good.

your idea of setting simple commands allow test automation system (the setup , reset commands) well. prepared add more during automation - while end-to-end-test conceptually black-box test, in reality it's grey-box test, i.e. need access internal state of system. call "operation , maintenance interface" of system under test.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -