Posts

Showing posts with the label java

How to raise a Defect in JIRA using Java Program

We always wonder that we have Test scripts to send an Email report to all the stakeholder with extensive report with count of Passed and failed after test suite execution but no logical test script to log the defect for the failed test cases in the Test management Tool. It might not affect much if we are working in conventional methodology like waterfall, protype etc. But we are in the level of deploying the products by adhering to the Continuous Delivery and Continuous Deployment process. So, to cope up the automation activities with the product deployment, the Product management tool – Jira provides an additional feature of updating/defect logging using test scripts by providing REST Api. Now we will look the implementation of Defect logging script, Pre-requisites :  Need below mentioned two Jars files in the build class path. Apache HttpClient 4.5.3 API - https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient/4.5.3 jersey-client.jar - http:/

Methods of easily debugging/fixing the scripts with known facts - Part2

Version mismatch of Installed Java, compiled Java project and Eclipse IDE. I have listed issues by high priority 1)        Eclipse - 32 bit , Java 8 64 bit 2)        Eclipse - 32 bit, Java 7 32 bit but the project is mapped to Java 6 path 3)        Wrongly pointed out of the Java bin path in the Path environment variable led to not able to open Eclipse IDE. If we try to open, it will throw exit code 13. 4)        java.lang.UnsupportedClassVersionError or Unsupported major.minor version 52.0 Happens because of using Higher JDK during compile time and lower JDK during runtime.                                 The issue 1 and 4 can be fixed by upgrading/degrading of either Eclipse or Java.The reported number in the error message is the requirednumber, not the number we are using. The reported major numbers with the required versions are,                                 Java SE 9 = 53,                                 Java SE 8 = 52,                             

Methods of easily debugging/fixing the scripts with known facts - Part1

Network proxy issue in the Firefox browser – we can handle the proxy issue in two ways a)        Fixing the issue outside the script – i.e., creating the Firefox Profile and set the proxy how we need and map it to the Selenium web driver script. By saying it looks easy. But the problem will start, Firefox profile Java class not able to get the correct intended Profile. This issue will happen if we have installed our Firefox browser outside the “c:/program files” folders. How we can resolve this issue? Yes, I do have workaround for this problem. We can achieve this by doing Method overriding. Here we need to override the method getPofiles of the class profileIni. Let see the code implementations, //Setting the firefox.exe file path File pathToBinary = new File (“<Firefox.exe file path>”); FirefoxBinary ffBinary = new FirefoxBinary(pathToBinary); //overriding the profilepath ProfilesIni profile = new ProfilesIni() { @Override public FirefoxProfile ge