configreader

A simplified framework for reading config.properties file.

License

License

Categories

Categories

config Application Layer Libs Configuration
GroupId

GroupId

com.github.mfaisalkhatri
ArtifactId

ArtifactId

configreader
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

configreader
A simplified framework for reading config.properties file.
Project URL

Project URL

https://github.com/mfaisalkhatri/ConfigReader
Project Organization

Project Organization

Faisal Khatri
Source Code Management

Source Code Management

https://github.com/mfaisalkhatri/ConfigReader

Download configreader

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.mfaisalkhatri/configreader/ -->
<dependency>
    <groupId>com.github.mfaisalkhatri</groupId>
    <artifactId>configreader</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.mfaisalkhatri/configreader/
implementation 'com.github.mfaisalkhatri:configreader:1.0.0'
// https://jarcasting.com/artifacts/com.github.mfaisalkhatri/configreader/
implementation ("com.github.mfaisalkhatri:configreader:1.0.0")
'com.github.mfaisalkhatri:configreader:jar:1.0.0'
<dependency org="com.github.mfaisalkhatri" name="configreader" rev="1.0.0">
  <artifact name="configreader" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.mfaisalkhatri', module='configreader', version='1.0.0')
)
libraryDependencies += "com.github.mfaisalkhatri" % "configreader" % "1.0.0"
[com.github.mfaisalkhatri/configreader "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.seleniumhq.selenium : selenium-java jar 3.12.0
log4j : log4j jar 1.2.17

test (1)

Group / Artifact Type Version
org.testng : testng jar 6.14.3

Project Modules

There are no modules declared in this project.

ConfigReader

A simple utility framework which can be used to read config.properties file easily.

Getting Started

This page includes all the information you need to get started including setup, usage, advantages, sample test.

What to do when you need help?

  • Discuss your queries by writing to me at:

  • Mail: [email protected]

  • Twitter: @mfaisal_khatri

  • LinkedIn: Mohammad Faisal Khatri

  • If you find any issue which is bottleneck for you, search the issue tracker to see if it is already raised.

  • If not raised, then you can create a new issue with required details as mentioned in the issue template.

What you do if you like the project?

  • Spread the word with your network.
  • Star the project to make the project popular.
  • Stay updated with the project progress by Watching it.

How to use this Framework:

  1. Add the following dependency in your pom.xml file:
<dependency>
    <groupId>com.github.mfaisalkhatri</groupId>
    <artifactId>configreader</artifactId>
    <version>1.0.0</version>
</dependency>
  1. Reading "Config.Properties" is made much simple and easy now. Check the sample code and tests below:
This is the config file extract: 
searchtext=Apple iphone 8
  1. Once the dependency jar is downloaded in project, Use "PropertiesReader" class and get the values from the properties file in below defined way:
@Test
	public void Test() throws FileNotFoundException, IOException, Throwable {

		PropertiesReader prop = new PropertiesReader();
		String srch = prop.getKey("searchtext");
		
		System.out.println("Value of search text key is: " +srch);
		Assert.assertEquals(srch, "Apple iphone 8");

	}

In the above case, Getter/Setter can also be created to get values from the properties file. Exceptions have been handled while reading file or when file is not found, so you don't have to worry, if any thing goes wrong in tests. Appropriate logs will be generated in project folder when exception is caught.

Versions

Version
1.0.0