When continuous predictors are present, classicalPearson and deviance goodness-of-fit tests to assesslogistic model fit break down. We propose a newmethod for goodness-of-fit testing which uses a verygeneral partitioning strategy (clustering) in thecovariate space and is based on either a Pearsonstatistic or a score statistic. Properties of theproposed statistics are discussed. Simulationstudies on many commonly encountered model scenariosare presented to compare the proposed tests to theexisting tests. Applications of these differentmethods on a real clinical trial study are alsoperformed to demonstrate the usefulness of the newmethod in practice and certain advantages over thewidely used Hosmer-Lemeshow test. Discussions onextending this new method to other data situations,such as ordinal response regression models andmarginal models for correlated binary data are alsoincluded. This method can also be extended to modelsfor multinomial outcomes where generalized logitmodels are often used.