How can I get module configuration for testing
The tests do not care about the settings, which are saved in the database. They work with settings in config/import/mymodule.settings.yml

The file can look like this:

var1: 'Some text'
var2: 1
var3: http://example.org


More info: https://www.drupal.org/docs/8/creating-custom-modules/include-default-configuration-in-your-drupal-8-module