Wednesday, October 21, 2020

Dry Fruits per day

 

https://food.ndtv.com/opinions/the-nutty-affair-just-how-much-of-these-nuts-should-you-be-eating-779321


 

 

 

1

Almonds

8-10

2

Walnuts

2

3

Dates

2

4

Cashew

4-5

5

Pista

5-7

6

Peanuts

8-10


Total quantity should not exceed more than 20 gms  / 25 pieces, suggested to take morning/day time.


Tuesday, October 13, 2020

hamcrest matchers java

 http://hamcrest.org/JavaHamcrest/javadoc/1.3/org/hamcrest/Matchers.html

Monday, October 12, 2020

JUnit All

To get the JUnit Test option, you should add the following 2 dependencies in the POM.xml

<dependency>

        <groupId>org.junit.jupiter</groupId>

        <artifactId>junit-jupiter-api</artifactId>

        <version>5.4.2</version>

        <scope>test</scope>

    </dependency>

    <dependency>

        <groupId>org.junit.jupiter</groupId>

        <artifactId>junit-jupiter-engine</artifactId>

        <version>5.4.2</version>

        <scope>test</scope>

    </dependency>

Monday, October 5, 2020

Weather app

 https://github.com/ChamichApps/Mock-Response-In-Retrofit-2.0/blob/master/app/src/main/java/com/vavian/mockretrofitrequests/rest/service/FakeInterceptor.java


With java-hamcrest 2.0.0.0 we can use this syntax:

    // import static org.hamcrest.MatcherAssert.assertThat;
    // import org.hamcrest.Matchers;

    BigDecimal a = new BigDecimal("100")
    BigDecimal b = new BigDecimal("100.00")
    assertThat(a,  Matchers.comparesEqualTo(b));
https://mkyong.com/java/jsonassert-how-to-unit-test-json-data/

Retrofit : A type-safe HTTP client for Android and Java.

 https://github.com/square/retrofit

https://square.github.io/retrofit/


Java Faker Library : To create random test data offline.

 

https://www.youtube.com/watch?v=tC9og1H2604&t=210s


Github: https://github.com/dius/java-faker

Documentation : http://dius.github.io/java-faker/apidocs/index.html


Demo Application: https://github.com/codingricky/java-faker-spring-boot

Git link for Demo app:  Its in Cradle make a check.

git clone https://github.com/codingricky/java-faker-spring-boot.git


its supports different languages also called locale


Helpful links:

https://medium.com/@grajeshr97/faker-library-dynamic-data-for-test-automation-25aa2b268790





JMeter Simple Controller

  Simple Controller is just a  container  for user request.