You can approach this in multiple ways but you need to think beyond the conf.js
file. You should look into using a build tool such as gulp, grunt or even npm (if you like shell scripting). All of which allow you to pass an external baseUrl and set the order in which your tests run. Personally I use gulp with gulp-protractor and runSequence (for executing tests in parallel).
An example of how I run gulp protractor is below
gulp.task('sauce', function(cb) {
gulp.src([]).pipe(protractor({
configFile: './conf.js',
args: [
'--baseUrl', '127.0.0.1/baseUrl',
'--specs' , 'todo-spec.js',
'--maxSessions', '1',
'--params.environment', 'sauce',
'--params.version', 1
]
})).on('error', function(e) { throw e; })
.on('end', cb);
});
Run Sequence is pretty straight forward once you read the documentation. In the least object oriented implementation you would copy the above task 5+ times and change the gulp task name, baseUrl and spec. Then make a runSequence task and include each of the tasks in the same line per the runSequence documentation. It would be to your benefit to remove the baseUrl,specs and any parallel execution settings from your conf.js file such as sharding, maxSessions etc. If you have multiple browsers/devices set up it will run them sequentially. Meaning once the todo-spec.js is done running in Chrome it will run in Firefox. If you have any questions please let me know in a comment.