Skip to main content

Posts

Showing posts with the label TipsAndTricks

Git Tip 💡

> Git aliases: Making aliases for popular commands to save time in the terminal is one of the most effective ways to enhance your everyday workflow. The most used Git commands like checkout, commit, etc. can be made into aliases using the following commands: -> git config --global alias.co checkout -> git config --global alias.ct commit Now, we only need to type "git co main" rather than "git checkout main". Likewise, type "git ct main" rather than "git commit main". We can also edit directly the .gitconfig file for the same purpose: [alias]     co = checkout     ct = commit

Cucumber interchangeable keywords

  Did you know that following keywords are interchangeable in cucumber, but should be better use depending on the context of your flow? Feature | Ability | Business Need Scenario Outline | Scenario Template: Examples | Scenarios #bdd   #cucumber   #syntax   #keywords   #tips   #automation   #gherkin

Copy paste java code from clipboard to your Eclipse

Small but a cool and an old trick for copy-pasting Java code in Eclipse. I have seen so many folks are still doing this when they want to copy-paste the Java code from the net via clipboard in their Eclipse. >Right click on the target folder where you want clipboard Java code >New >Create Class >Give a name and then finally remove the default code in this class and paste the Java code from their clipboard. You don't need to do all this. Just Right-click on the target folder where you want this Java code and paste from the clipboard or directly CTRL+V. Nice- isn’t it? Sample code: package com.test.apiAutomation.test; import java.util.HashMap; import java.util.Map; import org.testng.annotations.Test; public class TestCopyPaste { @Test public static void testCopyPaste() { Map<String, String> formParams = new HashMap<String, String>(); formParams.put("grant_type", "hey"); System.out.println("It's working, TADA...