-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dredd - API Blueprint Testing Tool. “Undefined” while testing #47
Comments
Couple of things:
I wasn't able to to reproduce your "undefined" problem. When making the changes above, however, I got the following output: Fail: GET /imp-endpoint/api/V0/Resources/CarSharing/Cars?lat=52.52&lng=13.39&radius=1000Message
Request
Expected
Actual
|
Hi Evan, Please find the screenshot of it and files I'm working with now in the https://www.dropbox.com/s/p9zexrj3g6htzlq/apiary.apib |
What version of dredd are you using? ( |
dredd - v0.2.1 on windows. |
Could you please kindly try to run the version v0.2.1 on windows? I'm curious if it is the versions problem or maybe there is smth wrong with my installation. |
@imp-partner-test I will try it and keep you posted. |
I've been putting in a little time on this issue here and there when I can. Good news: I've got a windows vm running with dredd 0.2.1 and I can reproduce your problem. Bad news: I can't easily test why it's happening because all of the build tools are written for mac/linux. So a fix will take a little more time. |
Today, I booted up the windows vm, downloaded the apib from the dropbox link, converted it to unix line endings, and dredd worked as expected. I thought I had narrowed it down, but everything is working now. Can no longer reproduce the |
@ecordell I can reproduce it right now. Do you have any pointers where I can look?
|
OK I have updated to latest Dredd (v0.3.0) and removed the @imp-partner-test can you still reproduce the problem with Dredd v0.3.0 and unix line endings?
|
So the summary is: Given I'm on Windows system Am I right? |
It used to be... After the last update of dredd v0.3.0 package I get the warning: "the use of carriage return(s) '\r' in source data isn't currently supported, please contact makers" in case the tested apiary blueprint contains \r in like endings |
It seems that CR+LF line endings are not suported in Sundown, markdown parser used by Snowcrash API Blueprint parser. So this is a Snowcrash issue. |
FWIW: Had this issue and fixed it with: https://www.npmjs.com/package/gulp-convert-newline . Formatted lined endings like: 'use strict';
var gulp = require('gulp'),
concat = require('gulp-concat'),
config = require('./config/apib_config.js'),
// […]
soften = require('gulp-soften'),
template = require('gulp-template'),
convertNewline = require("gulp-convert-newline");
var srcDir = './src/**/*.apib',
outDir = './build/',
outFile = 'output.apib';
gulp.task('main', function() {
gulp.src(srcDir)
.pipe(template(config))
.pipe(soften(4))
.pipe(concat('output.apib'))
.pipe(convertNewline({
newline: "lf"
}))
.pipe(gulp.dest('./build/'));
}); |
I installed dredd - API Blueprint Testing Tool and trying to test our APIary API against the implementation.
In the blueprint I have just one resource which is correctly implemented on somehost... but test fails :(
test command: dredd apiary.apib http://somehost.de:8443/imp-endpoint
output: Info: Beginning Dredd testing... undefined
I tried also with more options to get more information what is undefined.. like -l verbose and some other options. But I did not get more information about the failure :( Does anyone have experience with it? Thank you!!! :)
platform - win, dredd - v0.2.1, test apib: https://www.dropbox.com/s/p9zexrj3g6htzlq/apiary.apib, test.sh: https://www.dropbox.com/s/vqn6gch91vwqc16/test.sh
on stackoverflow: http://stackoverflow.com/questions/21881988/dredd-api-blueprint-testing-tool-undefined-issue
The text was updated successfully, but these errors were encountered: