dhkasjhdkjsahdkj In this article, We are going to explore basics of the Tesbo and Will start to write the one simple test script.
We need some Prerequisite, let’s take a look on it
- Java : Tesbo is complete written into the Java
- Maven : We will use the maven to manage the Tesbo dependency and configure the test run using maven, this will helpful when you need to configure test execution with CI/CD server like Jenkins
- Any IDE or Editor
- Basic Git Knowledge
Now Let's open the Editor and create a Test in Tesbo, We are here using an Intellij Community Edition but you can use it any Java Editor App.
- Create a New Project.
- Select Maven >> Create From Archetype >> org.apache.maven.archetype:meven-archetype-quickstart
We will create Maven Project for the dependency management and Running Test. This will be most useful while configuring with the CI/CD.
- Enter the Required Details and Finish Maven will download all the required configuration
- Once Finish, Folder structure will look like this.
We required a different folder structure for the createing a test in Tesbo but we will talk about it later
- Now, Let's download the Tesbo from Maven Repo.
- Copy following code into the POM.xml
Find the Latest Version from here
- Once you done with it, Intellij will automatically detect the changes and download the dependency but if not works for you then you can run the
mvn intallto download dependency.
Now we have environment ready for the creating a test. Let's create a Folder Structure shown as below inside the
- We are heading towards the creating a first scripts. Let's create a file with a name
- Copy Following test scripts into it
- Tests are declared by the
Test:Keyword following with the Test Title or description like
Search on Google
Step:is used for the defining the action that need to perform on the Web Pages like Click, Enter Text, Scroll Page etc.
Verify:is used for the asserting elements on the page. Test is fail when assert conditions are fail.
Endis used for declaring at the end of the Test.
@is used for the defining the locators value e.g. @SearchBox, @firstResult
#is used for adding tags to the Test. Tags are use full features when you run the Test. e.g. #Google
- Once we have the Test Ready, We required to define element locators for the
In Tesbo, We are declaring locators into the json format. Create a
Google.json inside the locator directory.
- Here you are observed that you don't need to declare the locators types, As Tesbo is automatically identify that. So this is again another advantages of the Tesbo.
- Now We have the test ready, We will go for the creating a
config.jsonwhich will help us to run the Test.
config.jsonis the configuration file for the running the test.
runcontains all the details about which test is going to run and in which browser going to run.
- Okey, We are ready now for Running Test, We have Test file, Locators file and Config file, Just need to create Java Runner file.
- Create a
Runner.javaJava class inside the Runner directory
- and Run this java class, and here you go... Your Test is running...
- Once Test completed you will be get the result inside the
htmlReport >> currentBuildReport.json.
you will get the basic idea about the creating and running Test into the Tesbo, You can explore the more features of Tesbo from Here and following is the some of the Quick Links
- Understanding the Steps Keyword
- Config file
We have made a setup very easy for you by creating a GitHub repository with the same setup, you can clone or download it from here