2 Corinthians 13:5 says that we should
Examine yourselves as to whether you are in the faith. Test yourselves. Do you not know yourselves, that Jesus Christ is in you?—unless indeed you are disqualified.
So how do you make sure that you are not disqualified? How do you make sure that you are not in that number of many church-going people who will say to God on Judgement Day
….Lord, Lord, have we not prophesied in thy name? and in thy name have cast out devils? and in thy name done many wonderful works? And then (he) will declare to them, ‘I never knew you; depart from Me, you who practice lawlessness!’(Matthew 7:22-23)
How do you know you are saved?
Well first of all, you should be displaying (or starting to display) the fruit of the spirit which is love, joy, peace, patience, kindness, goodness, faithfulness, gentleness and self-control (Galatians 5:22-23)
If you are displaying immorality, impurity, sensuality, idolatry, sorcery, enmities, strife, jealousy, outbursts of anger, disputes, dissensions, factions, envying, drunkenness and carousing, then this is a good indication that you are not saved and as it says in Galatians 5:21, those who practice such things will not inherit the kingdom of God
The books of 1 and 2 John also give you a list of things to look out for ’so that you may know that you have eternal life.’ (1 John 5:13)
You will not walk in darkness. If you do, then you do not practice or live by the truth (1 John 1:6)
You will have fellowship with other christians (1 John 1:7)
You recognise your sinful nature (1 John 1:8,10)
You confess your sins (1 John 1:9)
You obey and keep his commandments (1 John 2:3,5 ,1 John 3:24, 1 John 5:2)
You will not hate your brother or sister but love them (1 John 2:9,11 , 1 John 3:10 and 1 John 4:7-8,12-13, 20-21, 2 John 1:5)
You will not love the world or the things of the world (1 John 2:15)
You will do the will of God (1 John 2:17)
You believe the divinity of Jesus Christ and that he has come in the flesh (1 John 2:22 and 1 John 4:2-4,15, 2 John 1:7)
Biblical truth will be abiding in you (1 John 2:24)
You understand the righteousnes of Christ (1 John 2:29)
You will be practicing righteousness (1 John 2:29)
You will not habitually practice sin (1 John 3:8,9, 1 John 5:18)
You will have compassion for those in need (1 John 3:17)
You believe that Jesus is the Christ and is the Son of God (1 John 5:1)
You abide in the doctrine of Christ (2 John 1:9)
Now am I saying that if you are missing any of these then you are not saved? Of course not. It is not about perfection but about direction. You should be moving in the direction of doing the things above. This is called progressive sanctification where God is doing an inward work in you.
Other questions to ask yourself are:
Am I growing in holiness?
What is my relationship with sin?
Do I have a struggle with sin or do I feel no way about my sin? (Read Romans 7:7-25)
Do I hate it more and more or do I try and justify it?
Do I have a love for Gods word?
Do I hunger and thirst for righteousness?
Do I have a concern for the lost?
If the answer to the majority of these questions is no, then I would seriously doubt your salvation and I would urge you to repent of your sins and put your trust in Jesus Christ and in him alone.