Git Product home page Git Product logo

allurerestassured's Introduction

ALLURE REST ASSURED
allure

Proje örnek bir rest servisin get ve post requestleriyle api testlerinin yazılması ve rest assured ile entegrasyonu ile oluşturulmuştur.


Gereklilikler

  • Allure
  • Rest Assured
  • TESTNG

ALLURE Kurulum

Windows Powershell'i açın ve önce scoopu sonrasında ise allureyi sisteminize kurun

$ iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
$ scoop install allure


POM.XML

Projede allure ve rest assured kullanmak için pom.xml'de aşağıdaki gibi rest assured ve allurenin dependencyleri eklenmelidir.

 <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-rest-assured</artifactId>
            <version>2.13.2</version>
        </dependency>
        <!-- https://mvnrepository.com/artifact/io.qameta.allure/allure-maven -->
        <dependency>
            <groupId>io.qameta.allure</groupId>
            <artifactId>allure-maven</artifactId>
            <version>2.9</version>
        </dependency>

Plugin kısmına ise Junit eklenmelidir. Ben JUnit4 entegre ettim.

 <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.20</version>
                <configuration>
                    <testFailureIgnore>false</testFailureIgnore>
                    <argLine>
                        -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
                    </argLine>
                    <properties>
                        <property>
                            <name>listener</name>
                            <value>io.qameta.allure.junit4.AllureJunit4</value>
                        </property>
                    </properties>
                </configuration>
                <dependencies>
                    <dependency>
                        <groupId>org.aspectj</groupId>
                        <artifactId>aspectjweaver</artifactId>
                        <version>${aspectj.version}</version>
                    </dependency>
                </dependencies>
            </plugin>

Nasıl Kullanabilirim 💁

powershell

Terminalizde önce aşağıdaki gibi maven komutunu yazın. Bu işlemden sonra raporunuz target altında allure results klasoru altında oluşacaktır.

$  mvn clean test

Raporu ayağa kaldırmak için ise yine terminalinizde allure serve komutunu yazın.

$ allure serve C:\kullanıcıadı\proje lokasyonu \target\allure-results


Raporlama 📊

rapor |

Jenkins Plugin

Allure Jenkins Plugin

allurerestassured's People

Contributors

sevilayagil avatar vb10 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.