I tried configuring the bitcoin core test by editing the bitcoin.conf file with the required credentials.
Earlier, before the writing the test credentials it was a running full node. now the error is
config settings for rpcport only applied on the test network when in [test] section.