Teste tcs loja REST/Endpoints/Postman/log4j/java/hibernate/H2

Related tags

Testing tcsloja
Overview

# Aplicativo REST API LOJA (Cliente, Produto, Pedido, Itens do Pedido)

Requerimentos

Para construir e executar a aplicação você precisa:

Executando a aplicação localmente:

Há vários jeitos de execuatr uma aplicação Spring Boot localmente na sua máquina. Um dos modos é executar o método main na classe TcsLojaApplication na sua IDE.

Caso tenha instalado o Spring Boot Maven plugin é só digitar:

mvn spring-boot:run

Após executar o comando acima, acesse o navegador nos endereços:

Clientes

Listar todos clientes pré carregados:

http://localhost:8080/api/v1/clientes/

Mostrar um cliente em específico:

http://localhost:8080/api/v1/clientes/1

Mostrar todos clientes com paginação:

http://localhost:8080/api/v1/clientes/page

Produtos

Listar todos produtos pré carregados:

http://localhost:8080/api/v1/produtos/

Mostrar um produto em específico:

http://localhost:8080/api/v1/produtos/1

Mostrar todos produtos com paginação:

http://localhost:8080/api/v1/produtos/page

Pedidos

Listar todos pedidos pré carregados:

http://localhost:8080/api/v1/pedidos/

Mostrar um pedido em específico:

http://localhost:8080/api/v1/pedidos/1

Mostrar todos pedidos com paginação:

http://localhost:8080/api/v1/pedidos/page

Swagger UI

Para acessar o CRUD completo das classes utilizando as especificações REST, utilize o swagger conforme abaixo:

http://localhost:8080/api/v1/swagger-ui.html

H2 banco de dados em memória

Para acessar o banco de dados acesse a página:

http://localhost:8080/api/v1/h2-console/
  • jdbc:h2:mem:loja
  • username=sa
  • password=

Bibliotecas utilizadas:

  • spring-boot-starter-web
  • spring-boot-starter-data-jpa
  • spring-data-jpa
  • hibernate-entitymanager
  • com.h2database
  • hibernate-core
  • spring-boot-starter-test
  • validation-api
  • log4j
  • springfox-swagger2
  • springfox-swagger-ui
  • spring-boot-maven-plugin
You might also like...

A sample repo to help you handle basic auth for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you handle basic auth for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to handle basic auth for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - htt

Jul 13, 2022

A sample repo to help you clear browser cache with Selenium 4 Java on LambdaTest cloud. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you clear browser cache with Selenium 4 Java on LambdaTest cloud. Run your Java Selenium tests on LambdaTest platform.

How to clear browser cache with Selenium 4 Java on LambdaTest cloud Prerequisites Install and set environment variable for java. Windows - https://www

Jul 13, 2022

A sample repo to help you run automation test in incognito mode in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you run automation test in incognito mode in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to run automation test in incognito mode in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - htt

Jul 13, 2022

A sample repo to help you handle cookies for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you handle cookies for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to handle cookies for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - https:

Jul 13, 2022

A sample repo to help you set geolocation for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you set geolocation for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to set geolocation for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows - https

Jul 13, 2022

A sample repo to help you capture JavaScript exception for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you capture JavaScript exception for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to capture JavaScript exception for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Wi

Jul 13, 2022

A sample repo to help you find an element by text for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you find an element by text for automation test in Java-selenium on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to find an element by text for automation test in Java-selenium on LambdaTest Prerequisites Install and set environment variable for java. Windows

Jul 13, 2022

A sample repo to help you emulate network conditions in Java-selenium automation test on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

A sample repo to help you emulate network conditions in Java-selenium automation test on LambdaTest. Run your Java Selenium tests on LambdaTest platform.

How to emulate network conditions in Java-selenium automation test on LambdaTest Prerequisites Install and set environment variable for java. Windows

Jul 13, 2022
Owner
Magno Weege
Trying to learn something new every day!
Magno Weege
Java DSL for easy testing of REST services

Testing and validation of REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of usi

REST Assured 6.2k Dec 31, 2022
Java DSL for easy testing of REST services

Testing and validation of REST services in Java is harder than in dynamic languages such as Ruby and Groovy. REST Assured brings the simplicity of usi

REST Assured 6.2k Dec 25, 2022
Restful-booker API test automation project using Java and REST Assured.

Restful-booker API Test Automation Restful-booker API is an API playground created by Mark Winteringham for those wanting to learn more about API test

Tahanima Chowdhury 7 Aug 14, 2022
A template for Spring Boot REST API tested with JUnit 5 and Cucumber 6

demo-bdd Un template Spring Boot pour lancer un BDD/ATDD avec Cucumber 6 et JUnit 5. Maven et le JDK 17 seront nécessaires. Exécuter les tests Le proj

Rui Lopes 4 Jul 19, 2022
API-автотесты для Reqres с использованием библиотеки REST Assured

API-автотесты для Reqres Покрытый функционал Разработаны автотесты на API. API Запросы GET, POST, PUT, PATCH и DELETE Отображение statusCode и body в

Karina Gordienko 2 Jan 31, 2022
REST API for Apache Spark on K8S

Lighter Lighter is an opensource application for interacting with Apache Spark on Kubernetes or Apache Hadoop YARN. It is hevily inspired by Apache Li

Exacaster 38 Jan 5, 2023
A Java architecture test library, to specify and assert architecture rules in plain Java

ArchUnit is a free, simple and extensible library for checking the architecture of your Java code. That is, ArchUnit can check dependencies between pa

TNG Technology Consulting GmbH 2.5k Jan 2, 2023
HATEOAS with HAL for Java. Create hypermedia APIs by easily serializing your Java models into HAL JSON.

hate HATEOAS with HAL for Java. Create hypermedia APIs by easily serializing your Java models into HAL JSON. More info in the wiki. Install with Maven

null 20 Oct 5, 2022
Never debug a test again: Detailed failure reports and hassle free assertions for Java tests - Power Asserts for Java

Scott Test Reporter for Maven and Gradle Get extremely detailed failure messages for your tests without assertion libraries, additional configuration

Dávid Csákvári 133 Nov 17, 2022
TCP Chat Application - Java networking, java swing

TCP-Chat-Application-in-Java TCP Chat Application - Java networking, java swing Java – Multithread Chat System Java Project on core Java, Java swing &

Muhammad Asad 5 Feb 4, 2022