Part 2: Building API Automation Testing Framework in Rest Assured from from Scratch

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 มี.ค. 2023
  • #apitesting #restassured #framework
    @0:55 Continuing from part I
    READING CREATED USER
    @1:24 Create test method in "UserTests" class.
    @2:37 Call a method from "UserEndPoints" class and pass other method in parameter in it using "This" keyword to use same username
    @4:08 Store response in variable and log response in console
    @4:38 Validate status code using assertions (correction @5:55)
    @6:52 Execute the test
    UPDATE USER
    @9:15 Create test method.
    @9:46 Copy the code from postUser test method into this method.
    @10:35 Whichever the data to update we need to copy those Userpayload code.
    @11:15 Rename the method to update the data and pass parameters in it using "This" keyword to use same username
    @15:15 Log body in console
    @15:54 Storing after update response in variable and validate status code using assertions (correction @19:16)
    DELETE USER
    @16:54 Create test method.
    @17:35 Call a method from "UserEndPoints" class for same username using "This" keyword and store response in variable
    @18:15 Validate status code using assertions
    @23:14 Execute the test
    DATA DRIVEN TEST
    @24:32 Introduction
    @26:19 Create a folder under same project and paste the excel sheet
    @26:39 Opening excel sheet
    @27:42 Update pom.xml with APACHE POI dependencies
    @28:16 Paste the Excel utility file inside Utlities package
    @35:25 Paste the Dataprovider file inside Utlities package
    CREATE USER
    @43:22 Create a class under "Test" package
    @47:27 Create test method
    @48:11 In test annotation, add priority, refer particular data provider and refer its class.
    @50:45 Pass all variables related to user in parameters of test method
    @53:36 Create object for POJO class
    @54:09 Call all setter methods from POJO class and pass all variables related to user in parameters
    @55:00 Call "Create user" method from "UserEndPoints" class, pass object for POJO class in parameter, store response in variable
    and validate status code using assertion.
    DELETE USER
    @56:49 Create test method, in test annotation, add priority, refer particular data provider and refer its class.
    @58:29 Pass username variable in parameter of test method
    @58:51 Call "deleteuser" method from "UserEndPoints" class and pass username variable in parameter and store response in variable.
    @59:24 Validate status code using assertions
    @1:00:51 Execute the test
    EXTENT REPORTS
    @1:04:15 Update pom.xml with extent reports dependency
    @1:04:29 Paste the extent reports utility file inside Utlities package
    @1:11:52 Create testng.xml from Test package
    @1:12:40 Disable data driven testcase in testng.xml
    @1:13:20 Add extent reports tag inside testng.xml
    @1:14:52 Execute testng.xml
    @1:15:19 View reports
    LOGGERS
    @1:20:23 Add Apache log4j dependencies in pom.xml and update the project
    @1:22:20 paste "log4j2.xml" in src/test/resources
    @1:24:49 Create variable for logger class in test case class
    @1:25:27 Initiate that variable in Beforeclass method for same class
    @1:26:29 Adding logging messages in create user method and repeat for remaining methods.
    @1:28:59 Execute the test
    NOT WORKING WELL
    @1:29:57 Change log levels in "log4j2.xml" for debug logs
    @1:32:13 Call debug method in Beforeclass method
    @1:32:32 Execute the test
    Udemy Courses:
    Manual Testing+Agile with Jira Tool
    ► shorturl.at/xNXZ4
    Selenium with Java+Cucumber
    ► shorturl.at/aIKMW
    Selenium with Python & PyTest
    ► shorturl.at/ELW09
    Selenium with python using Robot framework
    ► shorturl.at/bcDPZ
    API Testing(Postman, RestAssured & SoapUI)
    ► shorturl.at/uAWY7
    Web & API Automation using Cypress with Javascript
    ► rb.gy/4uum2n
    Playwright with Javascript
    ► rb.gy/4uum2n
    Jmeter-Performance Testing
    ► rb.gy/ocj7r2
    SDET Essencials(Full Stack QA)
    ► rb.gy/hlnf2v
    Appium-Mobile Automation Testing
    ► rb.gy/wmzv64
    Java Collections
    ► bit.ly/3S66ezE
    Python Programming
    ► urlis.net/gdsfpb0s
    Cucumber BDD Framework
    ► bit.ly/3F7d69r
    Protractor with Javascript
    ► urlis.net/4uddm1qb
    TH-cam Playlists:
    Manual Testing & Agile
    ► bit.ly/3ujvaYa
    ► bit.ly/3OYzxQj
    SQL
    ► bit.ly/3R6XjeG
    ► bit.ly/3nE0a1s
    ► bit.ly/3IeKuuJ
    linux & Shell Scripting
    ► bit.ly/3up1Z6a
    ► bit.ly/3nzvGxx
    Java
    ► bit.ly/3R9QfOs
    ► bit.ly/3AoRMKM
    ► bit.ly/3IbTTDn
    ► bit.ly/3ybXInv
    ► bit.ly/3yCoHdw
    Selenium With Java+Cucumber
    ► bit.ly/3P2FMm4
    ► bit.ly/3yhiIt4
    ► bit.ly/3uokzet
    ► bit.ly/3a7XIND
    ► bit.ly/3umN2S9
    ► bit.ly/3aar7GW
    ► bit.ly/3y9kD2S
    ► bit.ly/3uhLskn
    Python
    ► bit.ly/3agNgU0
    ► bit.ly/3NJNnoy
    ► bit.ly/2CTQ4mR
    ► bit.ly/3OIYWh1
    Selenium With Python,Pytest&Behave
    ► bit.ly/3OHHoC9
    ► bit.ly/3IeNLdv
    ► bit.ly/2J4tPeT
    ► bit.ly/3ydSkAq
    Selenium With Python Using Robert Framework
    (Web&API Testing)
    ► bit.ly/3nUvlpr
    ► bit.ly/3nUvE3z
    GraphQL
    ► rb.gy/sj3gys

ความคิดเห็น • 132

  • @deepakrai5175
    @deepakrai5175 3 หลายเดือนก่อน +5

    This is the best tutorial of restassured framework with reporting , not only on TH-cam but on the entire internet as I have followed multiple rest assured framework tutorials. Thanks Pawan sir !

    • @sdetpavan
      @sdetpavan  3 หลายเดือนก่อน

      My Pleasure

  • @adityanarayan3325
    @adityanarayan3325 10 หลายเดือนก่อน +4

    You're Great Sir. We don't have any words praise your work

    • @sdetpavan
      @sdetpavan  9 หลายเดือนก่อน

      Thanks

  • @xXMrThomasXx
    @xXMrThomasXx 23 วันที่ผ่านมา +1

    My head is explode for the new knowledge xD Great tutorial :)

  • @supriyabarai4905
    @supriyabarai4905 ปีที่แล้ว +23

    I can't find the XLUtility and DataProviders files in the videos. Anyway, I created and executed it successfully.
    XLUtility.java==============
    package api.utilities;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import org.apache.poi.ss.usermodel.CellStyle;
    import org.apache.poi.ss.usermodel.DataFormatter;
    import org.apache.poi.xssf.usermodel.XSSFCell;
    import org.apache.poi.xssf.usermodel.XSSFRow;
    import org.apache.poi.xssf.usermodel.XSSFSheet;
    import org.apache.poi.xssf.usermodel.XSSFWorkbook;
    public class XLUtility {

    public FileInputStream fi;
    public FileOutputStream fo;
    public XSSFWorkbook workbook;
    public XSSFSheet sheet;
    public XSSFRow row;
    public XSSFCell cell;
    public CellStyle style;
    String path;

    public XLUtility(String path)
    {
    this.path=path;
    }

    public int getRowCount(String sheetName) throws IOException
    {
    fi=new FileInputStream(path);
    workbook=new XSSFWorkbook(fi);
    sheet=workbook.getSheet(sheetName);
    int rowcount=sheet.getLastRowNum();
    workbook.close();
    fi.close();
    return rowcount;
    }

    public int getCellCount(String sheetName,int rownum) throws IOException
    {
    fi=new FileInputStream(path);
    workbook=new XSSFWorkbook(fi);
    sheet=workbook.getSheet(sheetName);
    row=sheet.getRow(rownum);
    int cellcount=row.getLastCellNum();
    workbook.close();
    fi.close();
    return cellcount;
    }

    public String getCellData(String sheetName,int rownum,int colnum) throws IOException
    {
    fi=new FileInputStream(path);
    workbook=new XSSFWorkbook(fi);
    sheet=workbook.getSheet(sheetName);
    row=sheet.getRow(rownum);
    cell=row.getCell(colnum);

    DataFormatter formatter = new DataFormatter();
    String data;
    try {
    data=formatter.formatCellValue(cell);
    }
    catch(Exception e)
    {
    data="";
    }
    workbook.close();
    fi.close();
    return data;
    }
    public void setCellData(String sheetName,int rownum,int colnum,String data) throws IOException
    {
    File xlfile=new File(path);
    if(!xlfile.exists())
    {
    workbook=new XSSFWorkbook();
    fo=new FileOutputStream(path);
    workbook.write(fo);
    }
    fi=new FileInputStream(path);
    workbook=new XSSFWorkbook(fi);

    if(workbook.getSheetIndex(sheetName)==-1)
    workbook.createSheet(sheetName);
    sheet=workbook.getSheet(sheetName);

    if(sheet.getRow(rownum)==null)
    sheet.createRow(rownum);
    row=sheet.getRow(rownum);

    cell=row.createCell(colnum);
    cell.setCellValue(data);
    fo=new FileOutputStream(path);
    workbook.write(fo);
    workbook.close();
    fi.close();
    fo.close();

    }

    }
    Dataproviders.java=================
    package api.utilities;
    import java.io.IOException;
    import org.testng.annotations.DataProvider;
    public class Dataproviders {

    @DataProvider(name="Data")
    public String[][] getAllData() throws IOException
    {
    String path=System.getProperty("user.dir")+"//testData//Userdata.xlsx";
    XLUtility xl=new XLUtility(path);

    int rownum=xl.getRowCount("Sheet1");
    int colcount=xl.getCellCount("Sheet1",1);

    String apidata[][]=new String[rownum][colcount];

    for(int i=1;i

    • @kirankatkar4088
      @kirankatkar4088 ปีที่แล้ว

      Can you please help me

    • @michannelz
      @michannelz ปีที่แล้ว +1

      I got an error on the method "public String[] getUserNames() throws IOException", it's show explains like this "Data provider must return Object[][] or Iterator " can anyone help me?

    • @dagovf
      @dagovf ปีที่แล้ว

      Thank you so much!

    • @sivakumar7124
      @sivakumar7124 10 หลายเดือนก่อน

      Thankyou so much..

    • @Bored-Panda
      @Bored-Panda 10 หลายเดือนก่อน

      Thanks. did you manage to get the extent report utility code as well? If so, please can you share. Thanks in advance.

  • @salemabraham6291
    @salemabraham6291 2 หลายเดือนก่อน +2

    Thanks for giving us precious knowledge for free, Excellent explanation

    • @sdetpavan
      @sdetpavan  2 หลายเดือนก่อน

      Welcome

  • @amember1014
    @amember1014 ปีที่แล้ว +2

    Thank you Mr Pavan, excellent as usual!!!

  • @user-jq2jg9fp3u
    @user-jq2jg9fp3u 10 หลายเดือนก่อน +5

    Sir you are giving best knowledge free of cost. Thanks its so much useful, could u please add the extentReporter class and log4j.xml files here?

  • @Orderoll
    @Orderoll 10 หลายเดือนก่อน +3

    Precious knowledge for free

    • @sdetpavan
      @sdetpavan  9 หลายเดือนก่อน +2

      Thanks

  • @uday.7777
    @uday.7777 11 หลายเดือนก่อน +3

    In POST request test data is not updated, It shows previous data only. Guys any one notice that Please check once

  • @user-zy7lq9tf7h
    @user-zy7lq9tf7h 5 หลายเดือนก่อน

    good job bro

  • @yasinealbakir
    @yasinealbakir 5 หลายเดือนก่อน

    Mr. Pavan, In the web service method I tested, it creates the Id value itself and returns it as a response. I want to save this value to Excel and use it in my next test scenario. How can I do this according to your structure?

  • @nikhilbondarde
    @nikhilbondarde ปีที่แล้ว +1

    can we use scenario outline?? instead of DDT

  • @prasadchavakula8451
    @prasadchavakula8451 ปีที่แล้ว

    Pavan sir, if we have more columns in the excel sheet, is there any approach other than sending arguments in the DDTest class methods?

    • @gowthamteja7146
      @gowthamteja7146 4 หลายเดือนก่อน

      if you have more columns in the Excel sheet and you want to pass multiple values to your test methods, you can create custom objects or use a more complex data structure to represent the data from each row.

  • @MGdriver77
    @MGdriver77 10 หลายเดือนก่อน +6

    I couldn't find the XLUtility file. So I paused the video and typed the whole thing, lol.

    • @MGdriver77
      @MGdriver77 10 หลายเดือนก่อน +1

      Same for DataProviders. Also the @DataProvider (name="Data") annotation isn't working for me, had to comment it out so far

    • @user-in5wp8yo2i
      @user-in5wp8yo2i 2 หลายเดือนก่อน +1

      Me to, good for practice anyway. 🙂

    • @SanoopAI
      @SanoopAI หลายเดือนก่อน

      I faced the same issue, how does it magically appear for him 😀

  • @kevinagustinez5117
    @kevinagustinez5117 5 หลายเดือนก่อน

    I have a question, what happend if we put the information in the body with no data like we send in the format Json. For example when we send a body usually we put like this:
    {
    "name" : "name",
    "last_name" : "lastname"
    }
    But when you send the body you don't specifye ("name", getName) so, thats means the programs took the data in order so, if a put getLastname in "userPayload.setFirstName(faker.name().lastName());
    The program post like this
    {
    "name" : "lastname",
    "lastname" : "lastname"
    }
    I don't know if a explaind my self. Because if we don't send information in order that's mean the program took whatever you put in that order

  • @mytranathkollipara5005
    @mytranathkollipara5005 ปีที่แล้ว

    informative and easy to understand. thank you, can you provide bitbucket link of this code if any.

  • @DD12756
    @DD12756 ปีที่แล้ว

    Pls help me someone... I'm using eclipse latest version and java 17 ... I'm not able to get the response....their is no mistake in code I'm following as it is pavan sir... So kindly suggest me the supported software versions

  • @spidyniks
    @spidyniks 3 หลายเดือนก่อน

    When run the test it is throwing error although code what sir has showed is same. Do we need to do anything?

  • @ronbarybaryosef2412
    @ronbarybaryosef2412 5 หลายเดือนก่อน

    Mr. Pavan , great tutorial on building api infrastructure , where can we download this code from ? please provide a link , thanks

  • @rutujaadhav2916
    @rutujaadhav2916 6 หลายเดือนก่อน

    this API framework series is awesome
    I want learn n create framework for testing web application using Selenium+java could you please share link for the same
    so that I can answer folder structure n framework related interview questions.

  • @shekharadil3189
    @shekharadil3189 ปีที่แล้ว +2

    can you please share the data-provider and excel class file?

  • @postoronnii__
    @postoronnii__ ปีที่แล้ว +1

    What about negative scenarios?

  • @Moe.firouzabadi
    @Moe.firouzabadi ปีที่แล้ว

    Hi! Where can I find the files for this project? Thanks!

  • @sathyaprakashd3339
    @sathyaprakashd3339 ปีที่แล้ว

    Sir where did you get extent file scripts?

  • @SineQuaNon1
    @SineQuaNon1 5 หลายเดือนก่อน

    Thanks a lot for this very useful series. But where are the files that you said you will share, like log4j, XlUtility etc ?

    • @Lets_Roam
      @Lets_Roam 3 หลายเดือนก่อน

      get it from comments

  • @tusharsangale380
    @tusharsangale380 11 หลายเดือนก่อน

    extend report is not generated sir in folders?

  • @vidhyamanickaraj5802
    @vidhyamanickaraj5802 6 หลายเดือนก่อน

    Hi sir..Thanks for the excellent videos!Extent Report is not getting generated in folder..Anybody faced this issue?

  • @ravikanthbadam3527
    @ravikanthbadam3527 ปีที่แล้ว

    Part 3 when it will be available please

  • @user-zy6sf3xl6c
    @user-zy6sf3xl6c 10 หลายเดือนก่อน +1

    Hello @pavan sir where we can get this utility files

  • @piyushkotiyal9964
    @piyushkotiyal9964 7 หลายเดือนก่อน +2

    sir when i run UserTests it fails & give error ----- FAILED: testUpdateUserByName
    java.lang.AssertionError: expected [200] but found [301],seems like endpoints not working

  • @shobhagarun5515
    @shobhagarun5515 หลายเดือนก่อน

    Sir where do we find the documents and the XMLs of this API course class?

  • @charlesvim
    @charlesvim 5 หลายเดือนก่อน

    I have run the script and its failed. continuously getting "405 Not Allowed" error. can someone help in this.

  • @ksdnsdkumar1375
    @ksdnsdkumar1375 ปีที่แล้ว +3

    @0:55 Continuing from part I
    READING CREATED USER
    @1:24 Create test method in "UserTests" class.
    @2:37 Call a method from "UserEndPoints" class and pass other method in parameter in it using "This" keyword to use same username
    @4:08 Store response in variable and log response in console
    @4:38 Validate status code using assertions (correction @5:55)
    @6:52 Execute the test
    UPDATE USER
    @9:15 Create test method.
    @9:46 Copy the code from postUser test method into this method.
    @10:35 Whichever the data to update we need to copy those Userpayload code.
    @11:15 Rename the method to update the data and pass parameters in it using "This" keyword to use same username
    @15:15 Log body in console
    @15:54 Storing after update response in variable and validate status code using assertions (correction @19:16)
    DELETE USER
    @16:54 Create test method.
    @17:35 Call a method from "UserEndPoints" class for same username using "This" keyword and store response in variable
    @18:15 Validate status code using assertions
    @23:14 Execute the test
    DATA DRIVEN TEST
    @24:32 Introduction
    @26:19 Create a folder under same project and paste the excel sheet
    @26:39 Opening excel sheet
    @27:42 Update pom.xml with APACHE POI dependencies
    @28:16 Paste the Excel utility file inside Utlities package
    @35:25 Paste the Dataprovider file inside Utlities package
    CREATE USER
    @43:22 Create a class under "Test" package
    @47:27 Create test method
    @48:11 In test annotation, add priority, refer particular data provider and refer its class.
    @50:45 Pass all variables related to user in parameters of test method
    @53:36 Create object for POJO class
    @54:09 Call all setter methods from POJO class and pass all variables related to user in parameters
    @55:00 Call "Create user" method from "UserEndPoints" class, pass object for POJO class in parameter, store response in variable
    and validate status code using assertion.
    DELETE USER
    @56:49 Create test method, in test annotation, add priority, refer particular data provider and refer its class.
    @58:29 Pass username variable in parameter of test method
    @58:51 Call "deleteuser" method from "UserEndPoints" class and pass username variable in parameter and store response in variable.
    @59:24 Validate status code using assertions
    @1:00:51 Execute the test
    EXTENT REPORTS
    @1:04:15 Update pom.xml with extent reports dependency
    @1:04:29 Paste the extent reports utility file inside Utlities package
    @1:11:52 Create testng.xml from Test package
    @1:12:40 Disable data driven testcase in testng.xml
    @1:13:20 Add extent reports tag inside testng.xml
    @1:14:52 Execute testng.xml
    @1:15:19 View reports
    LOGGERS
    @1:20:23 Add Apache log4j dependencies in pom.xml and update the project
    @1:22:20 paste "log4j2.xml" in src/test/resources
    @1:24:49 Create variable for logger class in test case class
    @1:25:27 Initiate that variable in Beforeclass method for same class
    @1:26:29 Adding logging messages in create user method and repeat for remaining methods.
    @1:28:59 Execute the test
    NOT WORKING WELL
    @1:29:57 Change log levels in "log4j2.xml" for debug logs
    @1:32:13 Call debug method in Beforeclass method
    @1:32:32 Execute the test

    • @tholeduc6499
      @tholeduc6499 9 หลายเดือนก่อน

      Thanks bro, god bless you

  • @navitanagdive2595
    @navitanagdive2595 4 หลายเดือนก่อน

    For me testcase method is running but its not generating data...could anyone please help me

  • @user-no8ts3gp2q
    @user-no8ts3gp2q 11 หลายเดือนก่อน +3

    Hi all! Did anybody face any issues on getUserByUserName test? on my side it is failing with 404: User not found, even though I have done everything as in the video

    • @thundergaming1920
      @thundergaming1920 11 หลายเดือนก่อน

      Same error I am also facing.
      Did you got the solution?

    • @hewigaurav
      @hewigaurav 10 หลายเดือนก่อน

      Because you have to create a user first before finding it!

    • @santhoshk5741
      @santhoshk5741 6 หลายเดือนก่อน

      I am also facing the same issue and I noticed that user is not created when you call post user method.
      {
      "code": 200,
      "type": "unknown",
      "message": "1950701640"
      }

    • @nehanivalkar5290
      @nehanivalkar5290 4 หลายเดือนก่อน +1

      Ig its coz of authorisation
      As it can only be done by logged in user

    • @user-yz5jy1yl8z
      @user-yz5jy1yl8z 2 หลายเดือนก่อน

      @@thundergaming1920 Hey bro
      did you get the solution for that?

  • @FunLife-je8qo
    @FunLife-je8qo 5 หลายเดือนก่อน

    sir plz, it is any issue firstname and last name not generated (not showing in output)other id,email,phone number and password generated(showing)

  • @santhoshkumarnc6122
    @santhoshkumarnc6122 11 หลายเดือนก่อน

    Where i can get the XL Utility file.

  • @arunprasadh6618
    @arunprasadh6618 ปีที่แล้ว

    @SDET- QA Automation Techie
    I'm using Mac with IntelliJIDEA., I'm doing everything very perfect as like in this video., but the aventstack extent report is not generated for me inside the reports folder as soon as the test is completed., but however the same code works fine for me in windows (with Same IntellijIDEA).., I've also enable R&W permission for the reports folder in Mac., but it's not worked out., Kindly help me out., Also pls if any of you knows the solution., kindly help me out

    • @puneetarora2804
      @puneetarora2804 11 หลายเดือนก่อน

      unix takes forward slashes instead. try:
      sparkReporter = new ExtentSparkReporter(".//reports//" + repName);

  • @amalkumar5201
    @amalkumar5201 ปีที่แล้ว

    Sir I want to join your session how I can join please suggest

  • @R-user63
    @R-user63 ปีที่แล้ว

    Is this project available in Git??

  • @victusha5426
    @victusha5426 ปีที่แล้ว

    sir please provide git link or code utilised in video link for practice purpose it will be very useful

  • @prasannavenkatesan5140
    @prasannavenkatesan5140 3 หลายเดือนก่อน +1

    public static String get_url = base_url+"/user/{username}"; - Not working not passing the name exactly

    • @anujadangeti5196
      @anujadangeti5196 3 หลายเดือนก่อน

      Yes me also getting same error

    • @user-yz5jy1yl8z
      @user-yz5jy1yl8z 2 หลายเดือนก่อน

      Hi bro
      did you get the solution for that?
      if yes, then how to solve that

  • @shridharnraykar1486
    @shridharnraykar1486 ปีที่แล้ว

    Sir can you make similar api automation video using python n pytest

  • @farjanaaziz3984
    @farjanaaziz3984 3 หลายเดือนก่อน

    Very good Tutorial. How can we get the code? is there any github code repo? Thanks

  • @nandakumarj-vy5qy
    @nandakumarj-vy5qy หลายเดือนก่อน

    is the base URL changed or path param definition changed? anyone please let me know

  • @itstechshow7747
    @itstechshow7747 5 หลายเดือนก่อน

    Could you make videos API automation with python full course
    Thanks in advance

  • @rahulhirlekar6918
    @rahulhirlekar6918 ปีที่แล้ว +2

    Hello sir Can you provide utilities file , Data provider file ,Dataprovider access file file, apache poi class file

  • @Shridhar_Giri
    @Shridhar_Giri 10 หลายเดือนก่อน +2

    Pavan, if u don't mind, oculd u please share the data provider file and excel utility file in this chat.

  • @arifmiah6288
    @arifmiah6288 ปีที่แล้ว +1

    sir can u provide github link for this project.

  • @user-ve3zn6me9h
    @user-ve3zn6me9h 3 หลายเดือนก่อน

    Hi, Can you upload the final project with the code here?

  • @user-zy7lq9tf7h
    @user-zy7lq9tf7h 5 หลายเดือนก่อน +1

    Can any one, please share me the ExtentReportManager class

  • @FunLife-je8qo
    @FunLife-je8qo 5 หลายเดือนก่อน

    firstname and lastname not showing in output

  • @user-he5vc2vu5v
    @user-he5vc2vu5v 9 หลายเดือนก่อน

    where can i find please help me

  • @user-oy2uf8dn5f
    @user-oy2uf8dn5f ปีที่แล้ว +2

    Can anyone provide the Extent Report class file

    • @venkatvenki246
      @venkatvenki246 9 หลายเดือนก่อน

      Hi Anyone provide me the extent report manager class file

  • @achyutkembhavi3204
    @achyutkembhavi3204 ปีที่แล้ว +1

    Sir please share the XML file in description

  • @omsonawane9101
    @omsonawane9101 6 หลายเดือนก่อน

    Hi Sir
    I have asked multiple time for course content/files/documents but did not get reply from you
    please provide all pdf and docs related postman and Rest assured course or upload
    It's really help for me and others also
    please provide your reply/comment

  • @RohanKumar-vc5ii
    @RohanKumar-vc5ii 3 หลายเดือนก่อน

    Hello Sir, where can I get the ExcelUtility.java file?

  • @sanammaharjan7556
    @sanammaharjan7556 11 หลายเดือนก่อน +2

    where can i find utility file?

    • @user-he5vc2vu5v
      @user-he5vc2vu5v 9 หลายเดือนก่อน

      have you XL utility and data provider file ? if yes please share with me

  • @sumedhramteke9439
    @sumedhramteke9439 ปีที่แล้ว

    Anyone have github link for this project please share it

  • @Therealist16
    @Therealist16 ปีที่แล้ว

    @pavansdet Could you share XLutility file here

  • @yogalakshmik7232
    @yogalakshmik7232 ปีที่แล้ว +2

    sir can you please share the utility code
    ?

    • @agricultureinsights
      @agricultureinsights ปีที่แล้ว

      package api.utilities;
      import java.io.File;
      import java.io.FileInputStream;
      import java.io.FileOutputStream;
      import java.io.IOException;
      import org.apache.poi.ss.usermodel.CellStyle;
      import org.apache.poi.ss.usermodel.DataFormatter;
      import org.apache.poi.ss.usermodel.FillPatternType;
      import org.apache.poi.ss.usermodel.IndexedColors;
      import org.apache.poi.xssf.usermodel.XSSFCell;
      import org.apache.poi.xssf.usermodel.XSSFRow;
      import org.apache.poi.xssf.usermodel.XSSFSheet;
      import org.apache.poi.xssf.usermodel.XSSFWorkbook;
      public class XUtility {
      public FileInputStream fi;
      public FileOutputStream fo;
      public XSSFWorkbook workbook;
      public XSSFSheet sheet;
      public XSSFRow row;
      public XSSFCell cell;
      public CellStyle style;
      String path;

      public XUtility(String path)
      {
      this.path=path;
      }
      public int getRowCount(String sheetName)throws IOException
      {
      fi = new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      int rowcount=sheet.getLastRowNum();
      workbook.close();
      fi.close();
      return rowcount;
      }
      public int getCellCount(String sheetName,int rownum)throws IOException
      {
      fi=new FileInputStream(path);
      workbook =new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      row=sheet.getRow(rownum);
      int cellcount=row.getLastCellNum();
      workbook.close();
      return cellcount;
      }
      public String getCellData(String sheetName, int rownum, int colnum)throws IOException
      {
      fi =new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      row=sheet.getRow(rownum);
      cell=row.getCell(colnum);
      DataFormatter formatter =new DataFormatter();
      String data;
      try {
      data=formatter.formatCellValue(cell);
      }
      catch(Exception e)
      {
      data="";
      }
      workbook.close();
      fi.close();
      return data;
      }

      public void setCellData(String sheetName, int rownum, int colnum, String data) throws IOException
      {
      File xlfile=new File(path);
      if(!xlfile.exists()) // If file not exists then create new file
      {
      workbook=new XSSFWorkbook();
      fo=new FileOutputStream(path);
      workbook.write(fo);
      }
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook (fi);
      if(workbook.getSheetIndex (sheetName)==-1) // If sheet not exists then create new Sheet workbook.createSheet (sheetName); sheet-workbook.getSheet (sheetName);
      workbook.createSheet(sheetName);
      sheet=workbook.getSheet(sheetName);

      if(sheet.getRow(rownum)==null) // If row not exists then create new Row sheet.createRow(rownum); row-sheet.getRow(rownum);
      sheet.createRow(rownum);
      row=sheet.getRow(rownum);
      cell=row.createCell(colnum);
      cell.setCellValue(data);
      fo=new FileOutputStream(path);
      workbook.write(fo);
      fi.close();
      fo.close();
      }

      public void fillGreenColor(String sheetName,int rownum, int colnum)throws IOException{
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);

      row=sheet.getRow(rownum);
      cell=row.getCell(colnum);

      style=workbook.createCellStyle();
      style.setFillForegroundColor(IndexedColors.GREEN.getIndex());
      style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
      cell.setCellStyle(style);
      workbook.write(fo);
      workbook.close();
      fi.close();
      fo.close();
      }

      public void FillRedColor(String sheetName, int rownum, int colnum) throws IOException
      {
      fi= new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      row=sheet.getRow(rownum);
      cell=row.getCell(colnum);

      style=workbook.createCellStyle();
      style.setFillForegroundColor(IndexedColors.RED.getIndex());
      style.setFillPattern(FillPatternType.SOLID_FOREGROUND);

      cell.setCellStyle(style);
      workbook.write(fo);
      workbook.close();
      fi.close();
      fo.close();
      }
      }

  • @RohanKumar-vc5ii
    @RohanKumar-vc5ii 3 หลายเดือนก่อน

    Sir, please can you share your github link so that I can download this code?

  • @user-zy6sf3xl6c
    @user-zy6sf3xl6c ปีที่แล้ว

    FAILED CONFIGURATION: @BeforeClass api.test.UserTests.setupdata
    java.lang.NullPointerException: Cannot invoke "api.payload.User.setId(int)" because "this.userpayload" is null
    i got this error after running suit .....i will follow same step as you mentioned

  • @isuruakalanka8951
    @isuruakalanka8951 ปีที่แล้ว +1

    Can we get Utility files sir?

    • @sumedhramteke9439
      @sumedhramteke9439 ปีที่แล้ว

      package api.utilities;
      import java.io.File;
      import java.io.FileInputStream;
      import java.io.FileNotFoundException;
      import java.io.FileOutputStream;
      import java.io.IOException;
      import org.apache.poi.ss.usermodel.CellStyle;
      import org.apache.poi.ss.usermodel.DataFormatter;
      import org.apache.poi.ss.usermodel.FillPatternType;
      import org.apache.poi.ss.usermodel.IndexedColors;
      import org.apache.poi.xssf.usermodel.XSSFCell;
      import org.apache.poi.xssf.usermodel.XSSFRow;
      import org.apache.poi.xssf.usermodel.XSSFSheet;
      import org.apache.poi.xssf.usermodel.XSSFWorkbook;
      public class XLUtility {
      public FileInputStream fi;
      public FileOutputStream fo;
      public XSSFWorkbook workbook;
      public XSSFSheet sheet;
      public XSSFRow row;
      public XSSFCell cell;
      public CellStyle style;
      String path;
      public XLUtility(String path) {
      this.path = path;
      }
      public int getRowCount(String sheetName) throws IOException {
      fi = new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      sheet = workbook.getSheet(sheetName);
      int rowcount = sheet.getLastRowNum();
      workbook.close();
      fi.close();
      return rowcount;
      }
      public int getCellCount(String sheetName, int rownum) throws IOException {
      fi = new FileInputStream(path);
      sheet = workbook.getSheet(sheetName);
      row = sheet.getRow(rownum);
      int cellcount = row.getLastCellNum();
      workbook.close();
      fi.close();
      return cellcount;
      }
      public String getCellData(String sheetName, int rownum, int colnum) throws IOException {
      fi = new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      sheet = workbook.getSheet(sheetName);
      row = sheet.getRow(rownum);
      cell = row.getCell(colnum);
      DataFormatter formatter = new DataFormatter();
      String data;
      try {
      data = formatter.formatCellValue(cell);
      } catch (Exception e) {
      data = "";
      }
      workbook.close();
      fi.close();
      return data;
      }
      public void setCellData(String sheetName, int rownum, int colnum, String data) throws IOException {
      File xlfile = new File(path);
      if (!xlfile.exists())// if file not exist create new file
      {
      workbook = new XSSFWorkbook();
      fo = new FileOutputStream(path);
      workbook.write(fo);
      }
      fi = new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      if (workbook.getSheetIndex(sheetName) == -1) // if sheet not exist create new sheet
      workbook.createSheet(sheetName);
      sheet = workbook.getSheet(sheetName);
      if (sheet.getRow(rownum) == null) // if row not exist create new row
      sheet.createRow(rownum);
      row = sheet.getRow(rownum);
      cell = row.createCell(colnum);
      cell.setCellValue(data);
      fo = new FileOutputStream(path);
      workbook.write(fo);
      fi.close();
      fo.close();
      }
      public void fillGreencolor(String sheetName, int rownum, int colnum) throws IOException {
      fi = new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      sheet = workbook.getSheet(sheetName);
      row = sheet.getRow(rownum);
      cell = row.getCell(colnum);
      style = workbook.createCellStyle();
      style.setFillForegroundColor(IndexedColors.GREEN.getIndex());
      style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
      cell.setCellStyle(style);
      workbook.write(fo);
      workbook.close();
      fi.close();
      fo.close();
      }
      public void fillRedcolor(String sheetName, int rownum, int colnum) throws IOException {
      fi = new FileInputStream(path);
      workbook = new XSSFWorkbook(fi);
      sheet = workbook.getSheet(sheetName);
      row = sheet.getRow(rownum);
      cell = row.getCell(colnum);
      style = workbook.createCellStyle();
      style.setFillForegroundColor(IndexedColors.RED.getIndex());
      style.setFillPattern(FillPatternType.SOLID_FOREGROUND);
      cell.setCellStyle(style);
      workbook.write(fo);
      workbook.close();
      fi.close();
      fo.close();
      }
      }

  • @lavanbalaraman
    @lavanbalaraman 4 หลายเดือนก่อน

    can someone pls tell me how to get this xlutility file and dataprovider.java file.. i have watched part1 and now in part 2, but how to get the files i dono

    • @Lets_Roam
      @Lets_Roam 3 หลายเดือนก่อน

      package api.utilities;
      import java.io.File;
      import java.io.FileInputStream;
      import java.io.FileOutputStream;
      import java.io.IOException;
      import org.apache.poi.ss.usermodel.CellStyle;
      import org.apache.poi.ss.usermodel.DataFormatter;
      import org.apache.poi.xssf.usermodel.XSSFCell;
      import org.apache.poi.xssf.usermodel.XSSFRow;
      import org.apache.poi.xssf.usermodel.XSSFSheet;
      import org.apache.poi.xssf.usermodel.XSSFWorkbook;
      public class XLUtility {

      public FileInputStream fi;
      public FileOutputStream fo;
      public XSSFWorkbook workbook;
      public XSSFSheet sheet;
      public XSSFRow row;
      public XSSFCell cell;
      public CellStyle style;
      String path;

      public XLUtility(String path)
      {
      this.path=path;
      }

      public int getRowCount(String sheetName) throws IOException
      {
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      int rowcount=sheet.getLastRowNum();
      workbook.close();
      fi.close();
      return rowcount;
      }

      public int getCellCount(String sheetName,int rownum) throws IOException
      {
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      row=sheet.getRow(rownum);
      int cellcount=row.getLastCellNum();
      workbook.close();
      fi.close();
      return cellcount;
      }

      public String getCellData(String sheetName,int rownum,int colnum) throws IOException
      {
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);
      sheet=workbook.getSheet(sheetName);
      row=sheet.getRow(rownum);
      cell=row.getCell(colnum);

      DataFormatter formatter = new DataFormatter();
      String data;
      try {
      data=formatter.formatCellValue(cell);
      }
      catch(Exception e)
      {
      data="";
      }
      workbook.close();
      fi.close();
      return data;
      }
      public void setCellData(String sheetName,int rownum,int colnum,String data) throws IOException
      {
      File xlfile=new File(path);
      if(!xlfile.exists())
      {
      workbook=new XSSFWorkbook();
      fo=new FileOutputStream(path);
      workbook.write(fo);
      }
      fi=new FileInputStream(path);
      workbook=new XSSFWorkbook(fi);

      if(workbook.getSheetIndex(sheetName)==-1)
      workbook.createSheet(sheetName);
      sheet=workbook.getSheet(sheetName);

      if(sheet.getRow(rownum)==null)
      sheet.createRow(rownum);
      row=sheet.getRow(rownum);

      cell=row.createCell(colnum);
      cell.setCellValue(data);
      fo=new FileOutputStream(path);
      workbook.write(fo);
      workbook.close();
      fi.close();
      fo.close();

      }
      }

    • @Lets_Roam
      @Lets_Roam 3 หลายเดือนก่อน

      package api.utilities;
      import java.io.IOException;
      import org.testng.annotations.DataProvider;
      public class DataProviders {

      @DataProvider(name="Data")
      public String[][] getAllData() throws IOException
      {
      String path=System.getProperty("user.dir")+"//testData//UserData.xlsx";
      XLUtility xl=new XLUtility(path);

      int rownum=xl.getRowCount("Sheet1");
      int colcount=xl.getCellCount("Sheet1",1);

      String apidata[][]=new String[rownum][colcount];

      for(int i=1;i

  • @DineshkumarS-gv2fb
    @DineshkumarS-gv2fb หลายเดือนก่อน

    Hi Sir,can you share the XLutilitie file sir that would be helpful for us

  • @suryagowda3663
    @suryagowda3663 11 หลายเดือนก่อน

    Hi pavan sir, can u pls give me latest video in github repo link pls sir

  • @epicgamers1998
    @epicgamers1998 5 วันที่ผ่านมา

    Please crete graphql automation using restassured

  • @soniyajabade-qj1zf
    @soniyajabade-qj1zf ปีที่แล้ว +1

    On Udemy how to get 'selenium with java course by Pavan sir' at offer price

    • @somashekarkv4845
      @somashekarkv4845 ปีที่แล้ว +1

      Every now and then after discount, price reduces to 449 Rs. Buy at that time.

    • @soniyajabade-qj1zf
      @soniyajabade-qj1zf ปีที่แล้ว

      @@somashekarkv4845 now the price is 3499/-

    • @somashekarkv4845
      @somashekarkv4845 ปีที่แล้ว

      @@soniyajabade-qj1zf Keep checking daily, it will reduce to 449 rs within this month

  • @veenaj4943
    @veenaj4943 ปีที่แล้ว

    Can you pls share excel utility file

  • @nitheeshm4810
    @nitheeshm4810 ปีที่แล้ว

    Utility file link?

    • @Therealist16
      @Therealist16 ปีที่แล้ว

      Did you get the utility file link?

  • @user-su9hd7xr6v
    @user-su9hd7xr6v 2 หลายเดือนก่อน

    Dear pavan Could you Share with us the Data provider file please

  • @user-he5vc2vu5v
    @user-he5vc2vu5v 9 หลายเดือนก่อน

    can you share XLUtility file with me

  • @sakshiaggarwal6199
    @sakshiaggarwal6199 ปีที่แล้ว

    Sir please share Excel Utility file.

  • @AbhishekGupta-fi9pd
    @AbhishekGupta-fi9pd 5 หลายเดือนก่อน

    while running the file user i am facing the issue
    [RemoteTestNG] detected TestNG version 7.4.0
    FAILED: f
    javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:131)
    can anyone help me for this

  • @ojaswikumar9629
    @ojaswikumar9629 2 หลายเดือนก่อน

    Why don't you provide any file

  • @abhilashnagdeve9762
    @abhilashnagdeve9762 10 วันที่ผ่านมา

    Sir pls provide Log4j2 xml file

  • @sarikagoel9528
    @sarikagoel9528 24 วันที่ผ่านมา

    log4j2 file

  • @tomidor4779
    @tomidor4779 4 หลายเดือนก่อน

    ./logs

  • @FunLife-je8qo
    @FunLife-je8qo 5 หลายเดือนก่อน

    sir plz, it is any issue firstname and last name not generated (not showing in output)other id,email,phone number and password generated(showing)