Tuesday, April 20, 2021

SQL - Datefunctions

        The Other day I was testing a story wherein I need to count the number of days with the current date to validate the end results.

        x/y/z columns date is greater than 60 days but less than 210 days.
        x/y/z columns date is greater than 60 days between 210 and 330.

     During test design, have prepared an excel sheet with the 'DAYS' function to auto calculate the days. However, I need to run SQL SELECT query against few tables copy the data into excel to cross-check, and then use the test data in API endpoints for further validation. Instead of using excel, I got a question why can't I check in SQL itself. Without putting much effort found inbuilt datefunctions, though they were many datefunctions I happened to use the below for testing.
 
        DATEDIFF(datepart, startdate, enddate) - three arguments
                        datepart - units in which differences to be reported.

            
         SELECT 
                    E.EMPID,
                    E.DEPT,
                    E.JOINDATE,
         FROM   EMPLOYEE E
         WHERE DATEDIFF(DAY,E.JOINDATE,GETDATE()) > 60


        DATEADD(datepart, number, date) - three arguments
                    this function adds a specified number value to a specified datepart.

        Ex: Notification to be given between 210 and 330 days based on 'y' column date.

         SELECT 
                    E.EMPID,
                    E.DEPT,
                    E.JOINDATE,
         FROM   EMPLOYEE E
         WHERE E.JOINDATE <= DATEADD(DAY,-210,GETDATE())
             AND E.JOINDATE >= DATEADD(DAY,-310,GETDATE()) 


        CONVERT(DATE, CREATEDON) - Though it's not datefunction, I have used it widely to format the DateTime columns to a specific format.




        
    

Saturday, April 10, 2021

ETL Testing - 101

                                        ETL Testing...we all know its full form is Extract Transform Load. Unlike traditional testing or backend/database testing ETL testing to be done with a different test approach. Though I have done combination backend, database and ETL testing in past I did not deep dive into ETL testing until I was asked to explain how I would do ETL testing. Since then I am spending time unlearn-learn...came across the site Datagaps...though there are many sources to learn have started going through this site and taking notes. Made an attempt to represent the notes in mind-map for easy reference.















Wednesday, February 3, 2021

Typical Testing Day

 

            Recently I came across a situation where I need to find whether a particular column has an integer value or varchar...there could be many ways to find the outcome however found the below query which is very simple.

Let us say we have a table called EMPLOYEE and ID is a varchar column, I need to find records which as integer or char.

SELECT * FROM EMPLOYEE

                    WHERE ID LIKE '%[^0-9]%' -- Looks for 0-9

                     OR ID LIKE '_%-%' -- Looks for the '-' other than 1st position.


 

If you ever come across a situation wherein you have to quickly modify the list of things in the SQL query...probably either you would have copied that text into excel added some formula to get the desired format. Instead, we can use this little trick in the SQL Query window itself...

   Hold ALT and mouse left click...you will notice vertical line '|' each string like below after that we can add the same character before or after the vertical line.





Hope it helps






Wednesday, December 9, 2020

TestFlix - Nov-2020

 #TestFlix - Nov - 2020 Binge-watch. 

I really want to thank/congratulate all the speakers, especially the speakers who did this for the first time. It's really great that you guys shared the platform with TestingGuru's/Legends. 

Though I missed the beginning due to technical glitches at my end, I am sure it would have been a fabulous beginning with #AshokThiruvengadam. Once I started watching TestFlix momentum continued till the last session it's by #AjayBalamurugadas. I planned to binge-watch the entire #TestFlix season however, I could not watch as my daughter came around 4:30 AM wondering what I am doing. I had to take a couple of hours break to continue... 

Though  '8' minutes look easy, people who binge-watched defiantly agree with me it's defiantly challenging to demonstrate the concept in 8 minutes. I am sure The Test Tribe community would have spent many hours conducting such a big event, just for the community.

Thank you again for the wonderful event, looking forward to similar events in the future. I will take TheTestTribe community help to become a speaker in the next event.

TEXTFLIX2020: TEXTFLIX2020

Friday, August 21, 2020

My First Workshop-Aug-15-2020

 

           

          Last week(08-15-2020) I have attended the 'THE TESTING LAB Learn to Test Faster and Better' conducted by 'Ajay Balamurugudas' and facilitated by 'The Test Tribe Community'. It's scheduled for 7 hours with small breaks in between. Total 25 people participated, most of them are from India  and rest are from other parts of the world. Participants came from different domains and background. Total workshop divided into 3 sessions and participants divided into 5 groups. In each session, we were given project mission and the team needs  to work on that mission, it could testing or review of the flowchart or test report. Through out the sessions I can feel my hunger towards workshop and participated with great enthusiasm. Based on the work we did, we got feedback to improve on, in addition to that Ajay also provided resources and tools we can use to 'Test Faster and Better'. This workshop really helps us to identify various tools and sources so that we can practice them to 'Test Faster and Better'. This is must attend workshop, have created Trello board  with all the resources provided for reference.

The Test Tribe-Workshop-Aug-15-2020

Happy Testing...Happy Learning

Sunday, August 16, 2020

Scrum Master

 

 Few months back I had nominated 'Scrum Master' training , after two days of intensive training successfully cleared the scrum master exam. During the training we were told that this training enables us how to use the Scrum doesn't provide any short cuts. Also needed lot's of disciplined practice to implement and follow. As part of the training we were provided some resources and material to read. Started with book 'SCRUM The Art of Doing Twice the Work in Half the Time' Jeff Sutherland. Surprisingly the book talks about the core SCRUM at end in very few pages but rest of the book author narrates how author observed the various industry projects and how those experiences can be utilized in a structured way in software development projects. More importantly he narrates how 'Servant Leadership' should work and how it fits into the Scrum world. Probably I might have to read this book several times to understand the 'Servant Leadership' style deeply.