Unable to construct database connection string when created with travis

I am trying to construct a database connection string from the database created by Travis when running tests, however, I am unable to construct successfully a database connection string.

My question is, following the below construct:

"postgres://user_name:password@hostname:port/database_name"

What becomes hostname and port ?

Below is a section of my travis.yml file setting up the database

before_script:
- psql -c 'create database eschool_mgt_test;' -U postgres
- psql -c "CREATE USER eschool_mgt WITH PASSWORD 'postgres';" -U postgres
Imprint