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
Split UI tests into e2e vs rest_api integration suites #5965
Conversation
@liggitt @fabianofranz @spadgett @benjaminapetersen first pass, just splits up the tests into two suites. if you have your api server running locally you can do
and that suite can always be run, repeatedly |
95f96e6
to
eef8e13
Compare
[test] |
unrelated re[test] |
eef8e13
to
32461f6
Compare
unrelated [test] |
[test] |
I'm looking at
Though it looks like most of the helpers at the top of |
Thinking about urls as well, might be nice to have a utility to abstract these away/pack them into one file (something like routes). // current
h.goToPage('/project/' + project['name'] + '/browse/builds');
// possibly something like
navigate.to.project.builds(project.name); |
Curious about
|
I debated this, the main reason I didnt was that I didn't want to have to On Thu, Nov 19, 2015 at 4:18 PM, Ben Petersen notifications@github.com
|
Thats a great Q. :) |
Huge improvement already breaking that big |
Last test error looks legitimate.
|
weird it was working locally On Fri, Nov 20, 2015 at 8:46 AM, Sam Padgett notifications@github.com
|
@benjaminapetersen for the integration vs e2e question. i'd be ok with that folder structure, but then it makes it weird to call the grunt task test-integration. so we have then we have all of the tests that require the api server to be started, a subset of those being the e2e tests which additionally require the e2e tests to have already run |
Like @benjaminapetersen mentioned, when I worked on these tests I had a similar idea of abstracting url's to a central place. It would require a simple templating mechanism to replace project name and other variables in the url, e.g. |
Actually would not require, but would make it more readable. :) |
we use URI.js for url templating On Fri, Nov 20, 2015 at 9:36 AM, Fabiano Franz notifications@github.com
|
Ok so either way I have to add an npm dependency to make it accessible as a require in the protractor tests, would you guys rather include mustache as a generic template tool that we can use for other stuff besides URLs or stick with URI.js for url building. This is specifically for test cases, not in actual code. |
I'm good with continuing with URI.js... the URITemplate constructor is pretty decent. I'm thinking something like: // perhaps named path.js
return {
to: {
project: {
create: new URITemplate('/project/' + projectName + '/create'),
images: new URITemplate('/project/' + projectName + '/catalog/images')
// etc
}
}
}
// used like
path.to.project.images(projectName); |
Throwing this out there for some thoughts.
Should we flip-flop integration & e2? I'm thinking of integration as a few of our front end components together, but e2e as larger scale/api Directory structure something like:
Thinking about suites. Perhaps we don't need a subdirectory `/suites', since a suite can be configured in the protractor-chrome.conf.js with arrays & blobs, letting us mix things up a bit: suites: {
// runs just the create test
project_create: 'tests/e2e/project/create.Spec.js',
// runs the 2 under pods
project_pods: 'tests/e2e/project/pods/**/*.Spec.js',
// runs the 3 under builds
project_builds: 'tests/e2e/project/builds/**/*.Spec.js',
// BUT this suite runs all the things...
rest_api: [
'tests/e2e/project/**/*Spec.js',
// more stuff
]
}; |
32461f6
to
d5ecce2
Compare
d5ecce2
to
c9016f8
Compare
Evaluated for origin test up to c9016f8 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin/7423/) |
yay [merge] |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_origin/4147/) (Image: devenv-rhel7_2801) |
Evaluated for origin merge up to c9016f8 |
Merged by openshift-bot
TODO
Implements https://trello.com/c/NFzYPctJ