poltergeist


Post via Capybara and Poltergiest for API testing


What's the best way to generate a post request to test an API. Sadly, this won't work since there is no form to submit: create a post request using poltergeist and capybara
Never mind, just added a post method to the poltergiest driver:
https://github.com/nathantsoi/poltergeist
use it with:
Gemfile:
gem 'capybara', '~> 2.4.4'
gem 'poltergeist', github: 'nathantsoi/poltergeist'
Tests:
page.driver.browser.post 'https://vertile.com/api/client/v1/stuff.json', { email: 'me#vertile.com', awesomeness: '1000%' }
If you're testing an API there's no need for Poltergeist.
Poltergeist is useful for testing web pages with Javascript on them without a browser so it can run headless.
We use the Faraday gem to generate all the RESTful calls, GET, POST and etc to an API. But Httparty is just as good, or even bare net/http

Related Links

How can I use “includeJs” function of phantomjs with poltergeist?
Poltergeist ruby gem fails to process `:shift` modifier in `send_keys`
Using Poltergiest to give user of app a screenshot of their page
Poltergeist 1.9.0 w/Ruby 1.9.3
Post via Capybara and Poltergiest for API testing
Poltergeist current_url command is returning page_info hash instead of a URL
How does one test the content of confirm dialogs using poltergeist?
Using Poltergeist, Phantom JS instances are not exiting during every rspec run
Render page element with padding in Poltergeist
Can I monkey patch the phantomjs browser api with execute_script?
send_keys support for Poltergeist?

Categories

HOME
ms-access
cakephp
java
vbscript
tizen
pycharm
path-finding
grep
adb
spring-cloud-stream
cmd
spring-jdbc
leon
blueprintjs
ezpublish
mouse
autotools
primary-key
python-unittest
windows-10-universal
imacros
quicklook
export-to-csv
clearcase-ucm
libtiff
telephony
oxyplot
firefox-webextensions
swiftlint
tar
firebase-crash-reporting
apache-commons-io
facet
info.plist
buck
gsmcomm
skia
sql-server-2012-express
binary-data
ecto
data-manipulation
column-family
perlin-noise
asset-pipeline
android-nestedscrollview
wallpaper
mapdb
picasso
git-merge
xcode-extension
automake
space-complexity
sqlite2
pdf-reactor
dynamic-reports
atomicity
jlink
dropbox-php
statsd
recursive-datastructures
directory-structure
lift-json
namecoin
qtwebview
lync-client-sdk
query-performance
quartz-composer
jquery-filter
deadbolt-2
instant
dstu2-fhir
skobbler-maps
merge-conflict-resolution
system.management
pervasive-sql
google-places
sframe
operation
pretty-print
lustre
operator-precedence
gui-test-framework
asp.net-web-api-odata
srs
centos5
intentservice
prettify
pyhdf
xamlparseexception
spring-validator
type-equivalence
sublist
first-responder
assembly-loading
custom-backend
gwt-ext
gcj
genshi
recent-documents
telerik-scheduler
radcombobox
yslow
digest-authentication
web-application-design
gamma
nhibernate.search
compiler-specific
web-architecture
webkit.net
adrotator
caching-application-block

Resources

Encrypt Message