Testing REST services and WEB UI from same project

Hi,

I’m new to codeceptJS and setting up the framework at the moment and I setup UI tests using webdriver and it works fine but I want to use also same project to test our REST services.
When I try to do this browser opens up although I want to test rest services am I missing something because I can’t find an example where you use both helpers.

my config:
exports.config = {
tests: ‘./tests//_test.js’,
output: ‘./output’,
helpers: {
WebDriver: {
url: ‘someaddress’,
browser: ‘chrome’,
desiredCapabilities: {
chromeOptions: {
args: [ “–disable-gpu”, “–start-maximized”, “–no-sandbox” ]
}
}
},
ChaiWrapper : {
require: ‘codeceptjs-chai’
},
Mochawesome: {
uniqueScreenshotNames: true
},
REST: {
endpoint: “someendpoint:87”,
onRequest: () => {
//request.headers.auth = “123”;
}
}
},

And yes my rest service case is failing. So I have a feeling it’s calling webdriver url and not rest endpoint.
How do I make API tests to use API endpoint and web cases to use url?

Thanks.

what is the error you are getting?

I get following error:
– FAILURES:

  1. RT Login
    Login to RT:
    write EPROTO 1440:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:c:\ws\deps\openssl\openssl\ssl\record\ssl3_record.c:332:

You need to put REST helper inside helpers.
helpers: {
WebDriver: {…},
REST: {…}
}